# Changelog 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. ## [5.5.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.4.0...v5.5.0) (2021-10-25) ### Features * Support type=module via scriptLoading option ([1e42625](https://github.com/jantimon/html-webpack-plugin/commit/1e4262528ff02a83e1fc7739b42472680fd205c2)), closes [#1663](https://github.com/jantimon/html-webpack-plugin/issues/1663) ### [5.4.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.3.2...v5.3.3) (2021-10-15) ### Features * update terser ([9c7fba0](https://github.com/jantimon/html-webpack-plugin/pull/1688) ### [5.3.2](https://github.com/jantimon/html-webpack-plugin/compare/v5.3.1...v5.3.2) (2021-06-22) ### Bug Fixes * update lodash and pretty error ([9c7fba0](https://github.com/jantimon/html-webpack-plugin/commit/9c7fba02d0aa7d9e804863a66eb896db3046f645) ### [5.3.1](https://github.com/jantimon/html-webpack-plugin/compare/v5.3.0...v5.3.1) (2021-03-09) ### Bug Fixes * remove loader-utils from plugin core ([82d0ee8](https://github.com/jantimon/html-webpack-plugin/commit/82d0ee8ddf146f17d71e98c1b44b2f2ec7420051)) ## [5.3.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.2.0...v5.3.0) (2021-03-07) ### Features * allow to modify the interpolation options in webpack config ([d654f5b](https://github.com/jantimon/html-webpack-plugin/commit/d654f5b90022304335b372d424ff4c08d3a9d341)) * drop loader-utils dependency ([41d7a50](https://github.com/jantimon/html-webpack-plugin/commit/41d7a50516aefd1af2704e3837d5d41351c6199b)) ## [5.2.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.1.0...v5.2.0) (2021-02-19) ### Features * improve ssr ([73d2a66](https://github.com/jantimon/html-webpack-plugin/commit/73d2a660b10b9ebf8a341f0ddb173bcaaf1e513c)) ## [5.1.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.0.0...v5.1.0) (2021-02-12) ### Features * omit html tag attribute with null/undefined/false value ([aa6e78d](https://github.com/jantimon/html-webpack-plugin/commit/aa6e78d1430c17d9cf05550b2c9f73a9a0c0166c)), closes [#1598](https://github.com/jantimon/html-webpack-plugin/issues/1598) ## [5.0.0](https://github.com/jantimon/html-webpack-plugin/compare/v4.5.1...v5.0.0) (2021-02-03) ### ⚠ BREAKING CHANGES * Drop support for `webpack` 4 and `node` <= 10 - For older webpack or node versions please use `html-webpack-plugin` 4.x * Entry javascript resources are now beeing loaded deferred in the `
` tag to improve the page load performance by default - You can set the `scriptLoading` option to `'blocking'` to keep the previous behaviour * Setting publicPath to `''` (an empty string) will no longer calculate a relative path from the html file to the assets anymore - You can set the `publicPath` option to `'auto'` to keep the previous behaviour * Plugins for `html-webpack-plugin` which add additional assetTags should provide a `meta` attribute * Drop support for `appcache-webpack-plugin` ### Features * drop `webpack` 4 and `node` <= 10 support to make use of the latest APIs ([b7a9e8f](https://github.com/jantimon/html-webpack-plugin/commit/b7a9e8f2a3c146cfec8f5c42888abd6aa0cde0b9)) * use the new webpack 5 APIs and create html files during the new `webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS` compilation stage ([8964bc4](https://github.com/jantimon/html-webpack-plugin/commit/8964bc4182e41807a564d3000217a40bc5f93ad2), [b6895cb](https://github.com/jantimon/html-webpack-plugin/commit/b6895cb5b85b1e6e850f638470cf9b839d421516), [a97234e](https://github.com/jantimon/html-webpack-plugin/commit/a97234ead5ea2dbba07a6e6a70c5ddb6a5a3c288), [1b59e09](https://github.com/jantimon/html-webpack-plugin/commit/1b59e0944f561b264f11847ef245c9fc3f05b80f), [4fca596](https://github.com/jantimon/html-webpack-plugin/commit/4fca5965315c49f6706812d9fdf6c7284d23d75b), [ed64a6b](https://github.com/jantimon/html-webpack-plugin/commit/ed64a6b35fe9cdbc610e9b766700f3b2fc2b8e4c), [86245db](https://github.com/jantimon/html-webpack-plugin/commit/86245db670a9b3bdd0e2aba9f2031745a98434c7), [50b3bec](https://github.com/jantimon/html-webpack-plugin/commit/50b3bec51a43289d6d1b4e1e6439560eb791576f), [c697725](https://github.com/jantimon/html-webpack-plugin/commit/c697725e9f4dd990bd4b7927bbfa7b826d2f36f2)) * allow generating one file per chunk with the new `'[name]'` placeholder for the `filename` option ([cd5bd2a](https://github.com/jantimon/html-webpack-plugin/commit/cd5bd2afc902bbe5a5ceec4756ef634a26aa1332), [3d9ff48](https://github.com/jantimon/html-webpack-plugin/commit/3d9ff48543d04d9f7c3440bfefb43751775a9e81)) * the `filename` option can now be a function ([c5beb4b](https://github.com/jantimon/html-webpack-plugin/commit/c5beb4bd16e4916b5355c300abebf9d7d3c587da)) * add support for `'auto'` public paths inside templates ([a059fcf](https://github.com/jantimon/html-webpack-plugin/commit/a059fcf32d94aaaa738359cedce0b0e4af68f0de), [b09b439](https://github.com/jantimon/html-webpack-plugin/commit/b09b439f50ecb75994acde2eb2967ad690ff1cf0)) * use defer as default script loading mechanism ([35b6b87](https://github.com/jantimon/html-webpack-plugin/commit/35b6b878db17f0f5704a187b336a14fdd58cedfc)) * allow to set publicPath to an empty string `''` ([5ea7de4](https://github.com/jantimon/html-webpack-plugin/commit/5ea7de4ba271813835be700316c8a1763b205d2d)) * improve typings ([197ddd8](https://github.com/jantimon/html-webpack-plugin/commit/197ddd88f39a2e6e70863b6fed2385d33043d137)) * provide public path to the alterAssetTagGroups hook ([1b54dfb](https://github.com/jantimon/html-webpack-plugin/commit/1b54dfbd62c0d0df10dd3d2be9937626142d518f)) * provide public path to the alterAssetTags hook ([b754626](https://github.com/jantimon/html-webpack-plugin/commit/b75462653d11803a428b1d29479e259c3010163f)) * use `thisCompilation` in child compiler for faster builds ([1d59e9a](https://github.com/jantimon/html-webpack-plugin/commit/1d59e9a71ddba1429168c42569a7bd9bdd363f4f)) * export new major in static property ([8b692bd](https://github.com/jantimon/html-webpack-plugin/commit/8b692bd7cc0b75ddf55f47da317eed9bd19dab91)) * reduce dependencies ([8c28aaa](https://github.com/jantimon/html-webpack-plugin/commit/8c28aaa2bed5a7147b397fef3801cfe8fb5c34b9), [56e633f](https://github.com/jantimon/html-webpack-plugin/commit/56e633fcb90909c2bbedbd63590ecaa825d8b31f)) ### Bug Fixes * emit files on every build to work properly with plugins like the clean-webpack-plugin ([6b3d087](https://github.com/jantimon/html-webpack-plugin/commit/6b3d087cf17f63b596c298d70a42a7462dd0f881)) * generate html files even if no webpack entry exists ([2693dfa](https://github.com/jantimon/html-webpack-plugin/commit/2693dfaf4c94625eab86afadfd0e4d8822092d6b)) * keep binary format when adding assets ([7e2b208](https://github.com/jantimon/html-webpack-plugin/commit/7e2b208634e26299c509e0c6b3189e01e4c3d3df)), closes [#1537](https://github.com/jantimon/html-webpack-plugin/issues/1537) ### [4.5.1](https://github.com/jantimon/html-webpack-plugin/compare/v4.5.0...v4.5.1) (2021-01-03) ### Bug Fixes * inject javascripts in the tag for inject:true and scriptLoading:'defer' ([4f7064e](https://github.com/jantimon/html-webpack-plugin/commit/4f7064ee56fe710e8f416018956647a72c270fb1)) # [4.5.0](https://github.com/jantimon/html-webpack-plugin/compare/v4.4.1...v4.5.0) (2020-09-21) ### Features * Add publicPath option to overrule the default path generation ([#1516](https://github.com/jantimon/html-webpack-plugin/issues/1516)) ([19b5122](https://github.com/jantimon/html-webpack-plugin/commit/19b5122)) * update webpack dependency range to allow installing webpack 5 beta ([f3ccdd5](https://github.com/jantimon/html-webpack-plugin/commit/f3ccdd5)), closes [#1504](https://github.com/jantimon/html-webpack-plugin/issues/1504) ## [4.4.1](https://github.com/jantimon/html-webpack-plugin/compare/v4.4.0...v4.4.1) (2020-08-30) ### Bug Fixes * broken typings.d.ts in v4.4.0 ([#1503](https://github.com/jantimon/html-webpack-plugin/issues/1503)) ([98ad756](https://github.com/jantimon/html-webpack-plugin/commit/98ad756)) # [4.4.0](https://github.com/jantimon/html-webpack-plugin/compare/v4.3.0...v4.4.0) (2020-08-30) ### Bug Fixes * fix typos in comments ([#1484](https://github.com/jantimon/html-webpack-plugin/issues/1484)) ([6b0711e](https://github.com/jantimon/html-webpack-plugin/commit/6b0711e)) ### Features * added v5 compilation support and deleted depreciation warnings ([4ae7be8](https://github.com/jantimon/html-webpack-plugin/commit/4ae7be8)), closes [#1454](https://github.com/jantimon/html-webpack-plugin/issues/1454) # [4.3.0](https://github.com/jantimon/html-webpack-plugin/compare/v4.2.2...v4.3.0) (2020-04-30) ### Features * Allow to use console.log inside templates ([c3f2fdc](https://github.com/jantimon/html-webpack-plugin/commit/c3f2fdc)) ## [4.2.2](https://github.com/jantimon/html-webpack-plugin/compare/v4.2.1...v4.2.2) (2020-04-30) ### Bug Fixes * Prevent "cannot read property info of undefined" when reading meta information from assets ([253ce30](https://github.com/jantimon/html-webpack-plugin/commit/253ce30)) * use modern icon tag rel attribute for favicons ([c40dd85](https://github.com/jantimon/html-webpack-plugin/commit/c40dd85)) ## [4.2.1](https://github.com/jantimon/html-webpack-plugin/compare/v4.2.0...v4.2.1) (2020-04-28) ### Bug Fixes * don't add dependencies twice to the webpack 5 watcher api ([ceafe14](https://github.com/jantimon/html-webpack-plugin/commit/ceafe143650749a5f53a14411dc1b762e252ec44)) * prevent scripts marked as hotModuleReplacement from being added to the html file ([119252a](https://github.com/jantimon/html-webpack-plugin/commit/119252a381bf43dea37c1be64f90c10bebc21302)) # [4.2.0](https://github.com/jantimon/html-webpack-plugin/compare/v4.1.0...v4.2.0) (2020-04-09) ### Features * Add template content ([#1401](https://github.com/jantimon/html-webpack-plugin/issues/1401)) ([4740bf7](https://github.com/jantimon/html-webpack-plugin/commit/4740bf7)) # [4.1.0](https://github.com/jantimon/html-webpack-plugin/compare/v4.0.4...v4.1.0) (2020-04-09) ### Features * Add webpack 5 support ([39c38a4](https://github.com/jantimon/html-webpack-plugin/commit/39c38a4)) * Allow webpack 5 as peer dependency ([9c571e2](https://github.com/jantimon/html-webpack-plugin/commit/9c571e2)) ## [4.0.4](https://github.com/jantimon/html-webpack-plugin/compare/v4.0.3...v4.0.4) (2020-04-01) ### Bug Fixes * Fix querystring encoding ([#1386](https://github.com/jantimon/html-webpack-plugin/issues/1386)) ([4f48a39](https://github.com/jantimon/html-webpack-plugin/commit/4f48a39e5738a5d431be2bec39c1b1f0de800d57)), closes [#1355](https://github.com/jantimon/html-webpack-plugin/issues/1355) ## [4.0.3](https://github.com/jantimon/html-webpack-plugin/compare/v4.0.2...v4.0.3) (2020-03-28) ### Bug Fixes * add webpack, tapable and html-minifier-terser as dependencies because of types.d.ts ([238da81](https://github.com/jantimon/html-webpack-plugin/commit/238da8123950f87267954fd448f3e6b0fb1ead17)) ## [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) ### Bug Fixes * update typedefs to match with html-minifier-terser ([2698c7e](https://github.com/jantimon/html-webpack-plugin/commit/2698c7e45a7f12113a07b256dc400ec89666130d)) # [4.0.0](https://github.com/jantimon/html-webpack-plugin/compare/v3.2.0...v4.0.0) (2020-03-23) The summary can be found in the [**release blog post**](https://dev.to/jantimon/html-webpack-plugin-4-has-been-released-125d). ### Bug Fixes * Add dependencies from the child compilation to the main compilation ([27c3e72](https://github.com/jantimon/html-webpack-plugin/commit/27c3e727b073701bfc739859d8325435d27cbf35)) * Add typing for assets(Close jantimon[#1243](https://github.com/jantimon/html-webpack-plugin/issues/1243)) ([9fef060](https://github.com/jantimon/html-webpack-plugin/commit/9fef0603eb532b3e6a1e8871b4568e62f9bba1a3)) * allow `contenthash` along with `templatehash` ([049d4d3](https://github.com/jantimon/html-webpack-plugin/commit/049d4d3436092b8beff3f5745e77b20f1c168c4c)), closes [#1033](https://github.com/jantimon/html-webpack-plugin/issues/1033) * Catch and ignore pretty-error errors ([2056139](https://github.com/jantimon/html-webpack-plugin/commit/2056139a9533ff9487506531491c0e5a94003607)), closes [#921](https://github.com/jantimon/html-webpack-plugin/issues/921) * Drop @types/webpack dependency ([d4eb1c7](https://github.com/jantimon/html-webpack-plugin/commit/d4eb1c749316af3964126606fe6c70a233c30fef)) * Ignore foreign child compilers ([1422664](https://github.com/jantimon/html-webpack-plugin/commit/14226649aa1bbaf7b174bcacafdbe47d8ba6c851)) * Improve perfomance for appcache files ([b94e043](https://github.com/jantimon/html-webpack-plugin/commit/b94e0434f5dbb06ee2179e91ebaa2ce7801937e0)) * load script files before style files files in defer script loading mode ([97f9fb9](https://github.com/jantimon/html-webpack-plugin/commit/97f9fb9a68e4d3c3c9453296c352e831f7546937)) * Prevent chunks from beeing added multiple times ([d65b37d](https://github.com/jantimon/html-webpack-plugin/commit/d65b37d2c588047e0d81a38f4645fcdb3ead0b9e)) * Prevent lodash from being inlined to work around a babel-loader incompatibility ([7f21910](https://github.com/jantimon/html-webpack-plugin/commit/7f21910707a2b53a9a5da3ac9e4b01e36147402f)), closes [#1223](https://github.com/jantimon/html-webpack-plugin/issues/1223) * Remove compilation.getStats() call for performance reasons ([7005a55](https://github.com/jantimon/html-webpack-plugin/commit/7005a557529bee948c5ef0a1b8b44a1a41a28417)) * remove useless links for options ([#1153](https://github.com/jantimon/html-webpack-plugin/issues/1153)) ([267e0e0](https://github.com/jantimon/html-webpack-plugin/commit/267e0e0eac155569c822c34f120490bdf3f56d43)) * Update references to html-minifier ([24bf1b5](https://github.com/jantimon/html-webpack-plugin/commit/24bf1b5e2a0d087b30d057d1780d8f495aa01e26)), closes [#1311](https://github.com/jantimon/html-webpack-plugin/issues/1311) * **typings.d.ts:** added apply method type to HtmlWwbpackPlugin class definitoin ([8b7255f](https://github.com/jantimon/html-webpack-plugin/commit/8b7255f555423dd1bfa51a3c28700e4bd116f97b)), closes [jantimon#1244](https://github.com/jantimon/issues/1244) * rename `contenthash` to `templatehash` ([4c11c5d](https://github.com/jantimon/html-webpack-plugin/commit/4c11c5dfde9d87d71dce9cf51864648f8e42b912)) * Repair typings ([#1166](https://github.com/jantimon/html-webpack-plugin/issues/1166)) ([f4cb241](https://github.com/jantimon/html-webpack-plugin/commit/f4cb241157a9a1fed4721b1abc1f390b09595494)) * small type. minifcation instead of minification ([#1154](https://github.com/jantimon/html-webpack-plugin/issues/1154)) ([56037a6](https://github.com/jantimon/html-webpack-plugin/commit/56037a6b2ae4a7606b54f5af213b6a2b8145f95e)) * Use src/index.ejs by default if present ([#1167](https://github.com/jantimon/html-webpack-plugin/issues/1167)) ([c27e5e4](https://github.com/jantimon/html-webpack-plugin/commit/c27e5e46a334d9c1e177a521ea7c9a5ba3c6d980)) * **chunksorter:** Don't sort chunks by default ([22fb03f](https://github.com/jantimon/html-webpack-plugin/commit/22fb03fb17fdb37d5ce6de00af154b5575a02d3a)) * **loader:** switch to loaderUtils.getOptions ([a0a0f0d](https://github.com/jantimon/html-webpack-plugin/commit/a0a0f0dc755fbc3249aa2e1d1c6a4dd307ab8e8a)) * **README:** adds a link to template option documentation ([f40aeae](https://github.com/jantimon/html-webpack-plugin/commit/f40aeae312af73c6c5263cd99e81069f41d3b699)) * **tests:** Upgrade webpack-recompilation-simulator ([dfe1d10](https://github.com/jantimon/html-webpack-plugin/commit/dfe1d10c4511b0da4354cacf79ca0d5ac7baf862)) * Update lodash to 4.17.10 ([cc3bf49](https://github.com/jantimon/html-webpack-plugin/commit/cc3bf4909605879993c22e3048ee520dbdc8fa49)) ### Code Refactoring * Change the structure of the internal assets object ([37db086](https://github.com/jantimon/html-webpack-plugin/commit/37db0868efdbf334a1b60003fe5bd376cfd8ae01)) * Changed hook names and arguments - the hook order is 'beforeAssetTagGeneration', 'alterAssetTags', 'alterAssetTagGroups', 'afterTemplateExecution', 'beforeEmit', 'afterEmit' ([14b4456](https://github.com/jantimon/html-webpack-plugin/commit/14b4456ba67a5b85421b558bbd5f1d59c7b410b3)) * Use Webpack 4 APIs ([47efdea](https://github.com/jantimon/html-webpack-plugin/commit/47efdeaf17806f7d4e26aefacc748a92077f904a)) ### Features * add `.toString` implementation to htmlTags to allow easier rendering ([34d8aa5](https://github.com/jantimon/html-webpack-plugin/commit/34d8aa572c7acc59c26f3b5d15bf489a07aa4c24)) * Add default viewport meta tag for default template ([302e39e](https://github.com/jantimon/html-webpack-plugin/commit/302e39e30013b5828bb6c9e7036db951f70d0cf5)), closes [#897](https://github.com/jantimon/html-webpack-plugin/issues/897) [#978](https://github.com/jantimon/html-webpack-plugin/issues/978) * Add defer script loading ([de315eb](https://github.com/jantimon/html-webpack-plugin/commit/de315eb98497f3e5f517d59dbbe120b48c9b8db9)) * Add support for relative publicPath ([dbbdd81](https://github.com/jantimon/html-webpack-plugin/commit/dbbdd81de570dd181ea0905a6445fdeb5a784912)) * Add support for