1.0.1 • Published 2 years ago
html-webpack-code-inject-plugin v1.0.1
html-webpack-code-inject-plugin
Webpack config
const HtmlWebpackCodeInjectPlugin = require('html-webpack-code-inject-plugin').default;
module.exports = {
plugins: [
new HtmlWebpackPlugin({
// some config
}),
new HtmlWebpackCodeInjectPlugin({
headHtmlTagObjectList: [
{
tagName: "script",
innerHTML: `
window.onresize = function() {
console.log('test')
}
`
}
],
excludeFileCallback: (fileName) => fileName === 'test.html'
})
]
};
LICENSE
MIT
1.0.1
2 years ago