Skip to content

Commit 1c37b2f

Browse files
refactor: next
BREAKING CHANGE: minimum supported webpack version is `^5.1.0`
1 parent 4a10f07 commit 1c37b2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1111
-7728
lines changed

.github/workflows/nodejs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
matrix:
5757
os: [ubuntu-latest, windows-latest, macos-latest]
5858
node-version: [10.x, 12.x, 14.x]
59-
webpack-version: [4, latest]
59+
webpack-version: [latest]
6060

6161
runs-on: ${{ matrix.os }}
6262

README.md

-43
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ And run `webpack` via your preferred method.
5151
| **[`minRatio`](#minratio)** | `{Number}` | `0.8` | Only assets that compress better than this ratio are processed (`minRatio = Compressed Size / Original Size`) |
5252
| **[`filename`](#filename)** | `{String\|Function}` | `[path][base].gz` | The target asset filename |
5353
| **[`deleteOriginalAssets`](#deleteoriginalassets)** | `{Boolean\|'keep-source-map'}` | `false` | Whether to delete the original assets or not |
54-
| **[`cache`](#cache)** | `{Boolean}` | `true` | Enable file caching |
5554

5655
### `test`
5756

@@ -319,48 +318,6 @@ module.exports = {
319318
};
320319
```
321320

322-
### `cache`
323-
324-
> ⚠ Ignored in webpack 5! Please use https://webpack.js.org/configuration/other-options/#cache.
325-
326-
Type: `Boolean|String`
327-
Default: `true`
328-
329-
Enable file caching.
330-
The default path to cache directory: `node_modules/.cache/compression-webpack-plugin`.
331-
332-
#### `Boolean`
333-
334-
Enable/disable file caching.
335-
336-
**webpack.config.js**
337-
338-
```js
339-
module.exports = {
340-
plugins: [
341-
new CompressionPlugin({
342-
cache: true,
343-
}),
344-
],
345-
};
346-
```
347-
348-
#### `String`
349-
350-
Enable file caching and set path to cache directory.
351-
352-
**webpack.config.js**
353-
354-
```js
355-
module.exports = {
356-
plugins: [
357-
new CompressionPlugin({
358-
cache: "path/to/cache",
359-
}),
360-
],
361-
};
362-
```
363-
364321
## Examples
365322

366323
### Using Zopfli

jest.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
module.exports = {
22
testEnvironment: "node",
3-
snapshotResolver: "./test/helpers/snapshotResolver.js",
43
};

0 commit comments

Comments
 (0)