diff --git a/CHANGELOG.md b/CHANGELOG.md index 520c81d6..feff45ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [4.0.2](https://github.com/jantimon/html-webpack-plugin/compare/v4.0.1...v4.0.2) (2020-03-26) + + +### Bug Fixes + +* don't remove trailing slashes from self closing tags by default ([2281e4b](https://github.com/jantimon/html-webpack-plugin/commit/2281e4bfda9b91c4a83d63bfc8df8372d1e6ae9e)) + + + ## [4.0.1](https://github.com/jantimon/html-webpack-plugin/compare/v4.0.0...v4.0.1) (2020-03-23) diff --git a/README.md b/README.md index bf450663..566d150e 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ The following variables are available in the template: - `webpackConfig`: the webpack configuration that was used for this compilation. This can be used, for example, to get the `publicPath` (`webpackConfig.output.publicPath`). -- `compilation`: the webpack [compilation](https://webpack.js.org/api/compilation/) object. +- `compilation`: the webpack [compilation object](https://webpack.js.org/api/compilation-object/). This can be used, for example, to get the contents of processed assets and inline them directly in the page, through `compilation.assets[...].source()` (see [the inline template example](examples/inline/template.pug)). diff --git a/index.js b/index.js index e6779f5f..764e0fc6 100644 --- a/index.js +++ b/index.js @@ -115,10 +115,11 @@ class HtmlWebpackPlugin { const minify = this.options.minify; if (minify === true || (minify === 'auto' && isProductionLikeMode)) { - /** @type { import('html-minifier').Options } */ + /** @type { import('html-minifier-terser').Options } */ this.options.minify = { - // https://github.com/kangax/html-minifier#options-quick-reference + // https://www.npmjs.com/package/html-minifier-terser#options-quick-reference collapseWhitespace: true, + keepClosingSlash: true, removeComments: true, removeRedundantAttributes: true, removeScriptTypeAttributes: true, diff --git a/package.json b/package.json index e9055cff..3705682f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "html-webpack-plugin", - "version": "4.0.1", + "version": "4.0.2", "license": "MIT", "description": "Simplifies creation of HTML files to serve your webpack bundles", "author": "Jan Nicklas (https://github.com/jantimon)", diff --git a/spec/basic.spec.js b/spec/basic.spec.js index 5d706c47..5e95725a 100644 --- a/spec/basic.spec.js +++ b/spec/basic.spec.js @@ -2304,4 +2304,27 @@ describe('HtmlWebpackPlugin', () => { ] }, [/