html-bundler-webpack-plugin
Advanced tools
Changelog
0.9.0 (2023-02-04)
data
of the preprocessor
has been moved to the 2nd argument as a propertyv0.9.0
: preprocessor: (content, { resourcePath, data }) => {}
<= NEW syntaxv0.8.0
: preprocessor: (content, { resourcePath }, data) => {}
<= old syntaxresource
propertyentry
Changelog
0.8.0 (2023-02-01)
feat: add entry
plugin option, this option is identical to Webpack entry plus additional data
property
feat: add 3rd data
argument of the preprocessor
to pass template specific data:
module.exports = {
plugins: [
new HtmlBundlerPlugin({
entry: {
// <= NEW `entry` option
index: {
import: 'src/views/template.html',
data: {
// <= NEW `data` property
title: 'Home',
},
},
},
}),
],
module: {
rules: [
{
test: /\.(html)$/,
loader: HtmlBundlerPlugin.loader,
options: {
preprocessor: (content, { resourcePath }, data) => {
// <= NEW 3rd `data` argument
return render(content, data);
},
},
},
],
},
};
feat: support split chunk
Changelog
0.7.0 (2023-01-29)
postprocess
plugin optionsrcset="image.png?{sizes: [100,200,300], format: 'jpg'}"
Changelog
0.6.0 (2023-01-28)
sources
loader option to define custom tags and attributes for resolving source filesextractComments
plugin option to enable/disable saving comments in *.LICENSE.txt filedata
attribute of object
tagresponsive-loader
Changelog
0.5.1 (2023-01-24)
Nunjucks
template engineNunjucks
template engineChangelog
0.5.0 (2023-01-22)
test
plugin option to process entry files that pass test assertionpreprocessor
loader option to allow pre-processing of content before handlingHandlebars
template engineChangelog
0.4.0 (2023-01-20)
<input>
<audio>
<video>
<track>
tags$$
chars chainChangelog
0.3.0 (2023-01-18)
<link>
tag with the attribute type="text/css"
as the style file