webpack笔记(2)打包src下的html文件
npm安装:
//安装依赖 npm install --save-dev html-webpack-plugin;
webpack.config.js中配置
const htmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
plugins:[
new htmlWebpackPlugin({
minify:{
removeAttributeQuotes : true
},
hash:true,
template : './src/index.html'
}),
]
}

浙公网安备 33010602011771号