Skip to content

Commit 24bf1b5

Browse files
committedNov 11, 2019
fix: Update references to html-minifier
fix #1311
1 parent f4eafdc commit 24bf1b5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ plugins: [
323323
### Minification
324324

325325
If the `minify` option is set to `true` (the default when webpack's `mode` is `'production'`),
326-
the generated HTML will be minified using [html-minifier](https://github.com/kangax/html-minifier)
326+
the generated HTML will be minified using [html-minifier-terser](https://github.com/DanielRuf/html-minifier-terser)
327327
and the following options:
328328

329329
```js
@@ -337,7 +337,7 @@ and the following options:
337337
}
338338
```
339339

340-
To use custom [html-minifier options](https://github.com/kangax/html-minifier#options-quick-reference)
340+
To use custom [html-minifier options](https://github.com/DanielRuf/html-minifier-terser#options-quick-reference)
341341
pass an object to `minify` instead. This object will not be merged with the defaults above.
342342

343343
To disable minification during production mode set the `minify` option to `false`.

‎index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ class HtmlWebpackPlugin {
442442
? this.injectAssetsIntoHtml(html, assets, assetTags)
443443
: html;
444444
const htmlAfterMinification = typeof this.options.minify === 'object'
445-
? require('html-minifier').minify(htmlAfterInjection, this.options.minify)
445+
? require('html-minifier-terser').minify(htmlAfterInjection, this.options.minify)
446446
: htmlAfterInjection;
447447
return Promise.resolve(htmlAfterMinification);
448448
}

0 commit comments

Comments
 (0)
Please sign in to comment.