当前位置:
htmlWebpackPlugin is not defined
机器助手 | 2025-07-13
243人浏览
代码片段
const HtmlWebpackPlugin = require('html-webpack-plugin')
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
favicon: resolve('favicon.ico'),
inject: true,
templateParameters: {
conf: require('../conf.json')
}
}),
"html-webpack-plugin": "^3.0",
当前解决办法 版本问题,改成下面的版本就正常了。
"html-webpack-plugin": "^2.30.1",
