diff --git a/README.md b/README.md index e9bce95c..0c78ee3a 100644 --- a/README.md +++ b/README.md @@ -323,7 +323,7 @@ plugins: [ ### Minification If the `minify` option is set to `true` (the default when webpack's `mode` is `'production'`), -the generated HTML will be minified using [html-minifier](https://github.com/kangax/html-minifier) +the generated HTML will be minified using [html-minifier-terser](https://github.com/DanielRuf/html-minifier-terser) and the following options: ```js @@ -337,7 +337,7 @@ and the following options: } ``` -To use custom [html-minifier options](https://github.com/kangax/html-minifier#options-quick-reference) +To use custom [html-minifier options](https://github.com/DanielRuf/html-minifier-terser#options-quick-reference) pass an object to `minify` instead. This object will not be merged with the defaults above. To disable minification during production mode set the `minify` option to `false`. diff --git a/index.js b/index.js index 3dcfbde9..2442e373 100644 --- a/index.js +++ b/index.js @@ -442,7 +442,7 @@ class HtmlWebpackPlugin { ? this.injectAssetsIntoHtml(html, assets, assetTags) : html; const htmlAfterMinification = typeof this.options.minify === 'object' - ? require('html-minifier').minify(htmlAfterInjection, this.options.minify) + ? require('html-minifier-terser').minify(htmlAfterInjection, this.options.minify) : htmlAfterInjection; return Promise.resolve(htmlAfterMinification); }