Skip to content

Commit 255b226

Browse files
refactor: drop tests for webpack@4
1 parent a390616 commit 255b226

39 files changed

+141
-3444
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -139,98 +139,6 @@ module.exports = {
139139
};
140140
```
141141

142-
### `cache`
143-
144-
> ⚠ Ignored in webpack 5! Please use https://webpack.js.org/configuration/other-options/#cache.
145-
146-
Type: `Boolean|String`
147-
Default: `true`
148-
149-
Enable file caching.
150-
Default path to cache directory: `node_modules/.cache/html-minimizer-webpack-plugin`.
151-
152-
> ℹ️ If you use your own `minify` function please read the `minify` section for cache invalidation correctly.
153-
154-
#### `Boolean`
155-
156-
Enable/disable file caching.
157-
158-
**webpack.config.js**
159-
160-
```js
161-
module.exports = {
162-
optimization: {
163-
minimize: true,
164-
minimizer: [
165-
new HtmlMinimizerPlugin({
166-
cache: true,
167-
}),
168-
],
169-
},
170-
};
171-
```
172-
173-
#### `String`
174-
175-
Enable file caching and set path to cache directory.
176-
177-
**webpack.config.js**
178-
179-
```js
180-
module.exports = {
181-
optimization: {
182-
minimize: true,
183-
minimizer: [
184-
new HtmlMinimizerPlugin({
185-
cache: 'path/to/cache',
186-
}),
187-
],
188-
},
189-
};
190-
```
191-
192-
### `cacheKeys`
193-
194-
> ⚠ Ignored in webpack 5! Please use https://webpack.js.org/configuration/other-options/#cache.
195-
196-
Type: `Function<(defaultCacheKeys, file) -> Object>`
197-
Default: `defaultCacheKeys => defaultCacheKeys`
198-
199-
Allows you to override default cache keys.
200-
201-
Default cache keys:
202-
203-
```js
204-
({
205-
htmlMinimizer: require('html-minifier-terser/package.json').version, // html-minifier-terser version
206-
'html-minimizer-webpack-plugin': require('../package.json').version, // plugin version
207-
'html-minimizer-webpack-plugin-options': this.options, // plugin options
208-
nodeVersion: process.version, // Node.js version
209-
assetName: file, // asset path
210-
contentHash: crypto.createHash('md4').update(input).digest('hex'), // source file hash
211-
});
212-
```
213-
214-
**webpack.config.js**
215-
216-
```js
217-
module.exports = {
218-
optimization: {
219-
minimize: true,
220-
minimizer: [
221-
new HtmlMinimizerPlugin({
222-
cache: true,
223-
cacheKeys: (defaultCacheKeys, file) => {
224-
defaultCacheKeys.myCacheKey = 'myCacheKeyValue';
225-
226-
return defaultCacheKeys;
227-
},
228-
}),
229-
],
230-
},
231-
};
232-
```
233-
234142
### `parallel`
235143

236144
Type: `Boolean|Number`

jest.config.js

Lines changed: 0 additions & 1 deletion
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)