From 24bf1b5e2a0d087b30d057d1780d8f495aa01e26 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Mon, 11 Nov 2019 17:36:24 +0100 Subject: [PATCH] fix: Update references to html-minifier fix #1311 --- README.md | 4 ++-- index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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); }