All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
5.6.0 (2023-12-19)
- add
@rspack/core
as an optional peer dependency (#1829) (56ff3ae) - Added support
type=systemjs-module
via thescriptLoading
option (#1822) (7effc30)
5.5.4 (2023-12-06)
- avoid have undefined
type
for script tags (#1809) (9959484) - reemit assets from loaders (#1811) (a214736)
- reemit favicon in serve/watch mode (#1804) (57c5a4e)
5.5.3 (2023-06-10)
- don't add extra meta tag if it exists (#1802) (8f92788)
- pass all Node.js globals to templates (#1796) (f269fc0)
- types: fix type for
chunkSortMode
(#1798) (6ad0e55)
5.5.2 (2023-06-08)
5.5.1 (2023-04-15)
5.5.0 (2021-10-25)
5.4.0 (2021-10-15)
- update terser (9c7fba0
5.3.2 (2021-06-22)
- update lodash and pretty error (9c7fba0
5.3.1 (2021-03-09)
- remove loader-utils from plugin core (82d0ee8)
5.3.0 (2021-03-07)
- allow to modify the interpolation options in webpack config (d654f5b)
- drop loader-utils dependency (41d7a50)
5.2.0 (2021-02-19)
- improve ssr (73d2a66)
5.1.0 (2021-02-12)
5.0.0 (2021-02-03)
- Drop support for
webpack
4 andnode
<= 10 - For older webpack or node versions please usehtml-webpack-plugin
4.x - Entry javascript resources are now being loaded deferred in the
<head>
tag to improve the page load performance by default - You can set thescriptLoading
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 thepublicPath
option to'auto'
to keep the previous behaviour - Plugins for
html-webpack-plugin
which add additional assetTags should provide ameta
attribute - Drop support for
appcache-webpack-plugin
- drop
webpack
4 andnode
<= 10 support to make use of the latest APIs (b7a9e8f) - use the new webpack 5 APIs and create html files during the new
webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS
compilation stage (8964bc4, b6895cb, a97234e, 1b59e09, 4fca596, ed64a6b, 86245db, 50b3bec, c697725) - allow generating one file per chunk with the new
'[name]'
placeholder for thefilename
option (cd5bd2a, 3d9ff48) - the
filename
option can now be a function (c5beb4b) - add support for
'auto'
public paths inside templates (a059fcf, b09b439) - use defer as default script loading mechanism (35b6b87)
- allow to set publicPath to an empty string
''
(5ea7de4) - improve typings (197ddd8)
- provide public path to the alterAssetTagGroups hook (1b54dfb)
- provide public path to the alterAssetTags hook (b754626)
- use
thisCompilation
in child compiler for faster builds (1d59e9a) - export new major in static property (8b692bd)
- reduce dependencies (8c28aaa, 56e633f)
- emit files on every build to work properly with plugins like the clean-webpack-plugin (6b3d087)
- generate html files even if no webpack entry exists (2693dfa)
- keep binary format when adding assets (7e2b208), closes #1537
4.5.2 (2021-02-18)
- more robust variable value extraction to add support for webpack >= 5.22.0 (1aabaf9)
4.5.1 (2021-01-03)
- inject javascripts in the tag for inject:true and scriptLoading:'defer' (4f7064e)
4.5.0 (2020-09-21)
- Add publicPath option to overrule the default path generation (#1516) (19b5122)
- update webpack dependency range to allow installing webpack 5 beta (f3ccdd5), closes #1504
4.4.1 (2020-08-30)
4.4.0 (2020-08-30)
4.3.0 (2020-04-30)
- Allow to use console.log inside templates (c3f2fdc)
4.2.2 (2020-04-30)
- Prevent "cannot read property info of undefined" when reading meta information from assets (253ce30)
- use modern icon tag rel attribute for favicons (c40dd85)
4.2.1 (2020-04-28)
- don't add dependencies twice to the webpack 5 watcher api (ceafe14)
- prevent scripts marked as hotModuleReplacement from being added to the html file (119252a)
4.2.0 (2020-04-09)
4.1.0 (2020-04-09)
4.0.4 (2020-04-01)
4.0.3 (2020-03-28)
- add webpack, tapable and html-minifier-terser as dependencies because of types.d.ts (238da81)
4.0.2 (2020-03-26)
- don't remove trailing slashes from self closing tags by default (2281e4b)
4.0.1 (2020-03-23)
- update typedefs to match with html-minifier-terser (2698c7e)
4.0.0 (2020-03-23)
The summary can be found in the release blog post.
- Add dependencies from the child compilation to the main compilation (27c3e72)
- Add typing for assets(Close jantimon#1243) (9fef060)
- allow
contenthash
along withtemplatehash
(049d4d3), closes #1033 - Catch and ignore pretty-error errors (2056139), closes #921
- Drop @types/webpack dependency (d4eb1c7)
- Ignore foreign child compilers (1422664)
- Improve perfomance for appcache files (b94e043)
- load script files before style files files in defer script loading mode (97f9fb9)
- Prevent chunks from beeing added multiple times (d65b37d)
- Prevent lodash from being inlined to work around a babel-loader incompatibility (7f21910), closes #1223
- Remove compilation.getStats() call for performance reasons (7005a55)
- remove useless links for options (#1153) (267e0e0)
- Update references to html-minifier (24bf1b5), closes #1311
- typings.d.ts: added apply method type to HtmlWwbpackPlugin class definitoin (8b7255f), closes jantimon#1244
- rename
contenthash
totemplatehash
(4c11c5d) - Repair typings (#1166) (f4cb241)
- small type. minifcation instead of minification (#1154) (56037a6)
- Use src/index.ejs by default if present (#1167) (c27e5e4)
- chunksorter: Don't sort chunks by default (22fb03f)
- loader: switch to loaderUtils.getOptions (a0a0f0d)
- README: adds a link to template option documentation (f40aeae)
- tests: Upgrade webpack-recompilation-simulator (dfe1d10)
- Update lodash to 4.17.10 (cc3bf49)
- Change the structure of the internal assets object (37db086)
- Changed hook names and arguments - the hook order is 'beforeAssetTagGeneration', 'alterAssetTags', 'alterAssetTagGroups', 'afterTemplateExecution', 'beforeEmit', 'afterEmit' (14b4456)
- Use Webpack 4 APIs (47efdea)
- add
.toString
implementation to htmlTags to allow easier rendering (34d8aa5) - Add default viewport meta tag for default template (302e39e), closes #897 #978
- Add defer script loading (de315eb)
- Add support for relative publicPath (dbbdd81)
- Add support for tag (#1160) (c5d4b86)
- Add support for minifying inline ES6 inside html templates (c66766c), closes #1262
- Add support for the [contenthash] placeholder inside htm file names (ae8233a)
- Add typings to package.json (a524e8f), closes #1132
- Allow to return async template parameters (99f9362)
- drop workaround for "Uncaught TypeError: webpack_require(...) is not a function" to be compatible with webpack 5 (15ad0d2)
- Export major version of this plugin (6ae6f48)
- merge templateParameters with default template parameters (1d66e53)
- Provide a verbose error message if html minification failed (7df269f)
- compiler: Add file dependencies (bbc07a3)
- compiler: Use a single compiler for multiple plugin instances (f29ae88)
- compiler: Use timestamps to verify cache validity (0ebcd17)
- Remove selfClosingTag (5d3d8e4)
- Remove type="text/javascript" from injected script tags (b46bf67)
- Replace jade with pug in examples (d7ec407)
- Switch from jasmine to jest (ae1f435)
- hooks: Add a helper for easier hook access (b6dec4b)
- hooks: Provide static getHook method for access to all html-webpack-plugin hooks (#995) (82b34a1)
- Simplify element and charset attribute (55313be)
- support ES6 template string in default loader (d6b65dd), closes #950
- Use jsdoc for static typing (a6b8d2d)
- Use webpack 4 entries api to extract asset information (342867e)
- html-tags: Add a helper to create html-tags (ee6a165)
- defaults: Use src/index.ejs if no template option is set.
- defaults: The default template has now a predefined viewport meta tag
- defaults: The default meta utf-8 declaration was changed to
- hooks: Renamed beforeHtmlGeneration hook to beforeAssetTagGeneration
- hooks: Renamed beforeHtmlProcessing hook to alterAssetTags
- hooks: Renamed afterHtmlProcessing hook to beforeEmit
- hooks: The html-webpack-plugin doesn't add its hooks to the compilation object anymore
- The assets object which is used for the template parameters and inside hooks was changed. The chunks property was removed and the js and css property was converted from a string into an object
{ entryName: string, path: string}
- The mimetype information "text/javascript" is removed from all generated script tags
- Remove selfClosingTag attribute
- Template strings inside templates are now disabled by default
- Dropped support for Webpack 1 - 3
- Template variable webpack was removed
- chunksorter: Chunks aren't sorted anymore by default
3.2.0 (2018-04-03)
- loader: Allow to add new template parameters (f7eac19), closes #915
- loader: Use lodash inside the loader directly (7b4eb7f), closes #786
3.1.0 (2018-03-22)
3.0.8 (2018-03-22)
3.0.7 (2018-03-19)
3.0.6 (2018-03-06)
3.0.5 (2018-03-06)
- entries: do not ignore JS if there is also CSS (020b714)
- entries: Don't add css entries twice (0348d6b)
- hooks: Remove deprecated tapable calls #879 (2288f20)
3.0.4 (2018-03-01)
- entries: Don't add css entries twice (e890f23)
3.0.3 (2018-03-01)
- performance: Reduce the amount of chunk information gathered based on #825 (06c59a7)
3.0.2 (2018-03-01)
- query-loader: In case no query is provided, return an empty object. This fixes #727 (7587754)
3.0.1 (2018-03-01)
- package: Remove the extract-text-webpack-plugin peer dependency (57411a9)
3.0.0 (2018-28-02)
- Add support for the new webpack tapable to be compatible with webpack 4.x
- Remove bluebird dependency
- Similar to webpack 4.x the support for node versions older than 6 are no longer supported
- Add manual sort
- Performance improvements (#723)
- Add support for Webpack 3
- Backport 3.x void tag for plugin authors
- Revert 2.25.0 loader resolving
- Allow plugins to add attributes without values to the
<script>
and<link>
tags
- Clearer loader output
- Add basic support for webpack 2
- Hide event deprecated warning of 'applyPluginsAsyncWaterfall' for html-webpack-plugin-after-emit and improve the warning message.
- Update dependencies
- Add deprecate warning for plugins not returning a result
- Add [path] for favicons
- Update dependencies
- Stop automated tests for webpack 2 beta because of #401
- Update dependencies
- Better error handling (#354)
- Add
html-webpack-plugin-alter-asset-tags
event to allow plugins to adjust the script/link tags
- Exclude chunks works now even if combined with dependency sort
- Add
html-webpack-plugin-alter-chunks
event for custom chunk sorting and interpolation
- Updated all dependencies
- Add
type
attribute toscript
element to prevent issues in Safari 9.1.1
- Fix bug introduced by 2.16.2. Fixes #315
- Fix hot module replacement for webpack 2.x
- Add support for dynamic filenames like index[hash].html
- Add full unit test coverage for the webpack 2 beta version
- For webpack 2 the default sort will be 'dependency' instead of 'id'
- Upgrade dependencies
- Export publicPath to the template
- Add example for inlining css and js
- Add support for absolute output file names
- Add support for relative file names outside the output path
- Basic Webpack 2.x support #225
- Add
xhtml
option which is turned of by default. When activated it will inject self closed<link href=".." />
tags instead of unclosed<link href="..">
tags. (#255) - Add support for webpack placeholders inside the public path e.g.
'/dist/[hash]/'
. (#249)
- Add
hash
field to the chunk object - Add
compilation
field to the templateParam object (#237) - Add
html-webpack-plugin-before-html-generation
event - Improve error messages
- Support relative URLs on Windows (#205)
- Caching improvements (#204)
- Add
dependency
mode forchunksSortMode
to sort chunks based on their dependencies with each other
- Add support for require in js templates
- Refactoring
- Fix relative windows path
- Minor refactoring
- Fix for
"Uncaught TypeError: __webpack_require__(...) is not a function"
- Fix incomplete cache modules causing "HtmlWebpackPlugin Error: No source available"
- Fix some issues on Windows
- Prevent parsing the base template with the html-loader
- Fix
lodash
resolve error (#172)
- Fix missing module (#164)
- Move compiler to its own file
- Improve error messages
- Fix global HTML_WEBPACK_PLUGIN variable
- Support
lodash
template's HTML "escape" delimiter (<%- %>
) - Fix bluebird warning (#130)
- Fix an issue where incomplete cache modules were used
- Don't recompile if the assets didn't change
- Add events
html-webpack-plugin-before-html-processing
,html-webpack-plugin-after-html-processing
,html-webpack-plugin-after-emit
to allow other plugins to alter the html this plugin executes
- Inject css and js even if the html file is incomplete (#135)
- Update dependencies
- Synchronize with the stable
@1
version
- Fix
minify
option - Fix missing hash interpolation in publicPath
- Add support for webpack.BannerPlugin
- Add support for loaders in templates (#41)
- Remove
templateContent
option from configuration - Better error messages
- Update dependencies
- Add
chunksSortMode
option to configuration to control how chunks should be sorted before they are included to the html - Don't insert async chunks into html (#95)
- Update dependencies
- Fix paths on Windows
- Fix missing hash interpolation in publicPath
- Allow only
false
orobject
inminify
configuration option
- Add
size
field to the chunk object - Fix stylesheet
<link>
s being discarded when used with"inject: 'head'"
- Update dependencies
- Support placing templates in subfolders
- Don't include chunks with undefined name (#60)
- Don't include async chunks
- Update dependencies (lodash)
- Fix error when manifest is specified (#56)
- Allow to inject javascript files into the head of the html page
- Fix error reporting
- Add
favicon.ico
option - Add html minifcation
- Set charset using HTML5 meta attribute
- Reload upon change when using webpack watch mode
- Generate manifest attribute when using appcache-webpack-plugin
- Optionally add webpack hash as a query string to resources included in the HTML
(
hash: true
) for cache busting - CSS files generated using webpack (for example, by using the extract-text-webpack-plugin) are now automatically included into the generated HTML
- More detailed information about the files generated by webpack is now available
to templates in the
o.htmlWebpackPlugin.files
attribute. See readme for more details. This new attribute deprecates the oldo.htmlWebpackPlugin.assets
attribute. - The
templateContent
option can now be a function that returns the template string to use - Expose webpack configuration to templates (
o.webpackConfig
) - Sort chunks to honour dependencies between them (useful for use with CommonsChunkPlugin).