plugins 已注销 2022-01-18 97 阅读1分钟 插件,用于 bundle 文件的优化,资源管理和环境变量注入作用于整个构建 const path = require('path'); moudule.exports = { plugins: [ new HtmlWebpackPlugin({template: './src/index.html'}) // 放到 plugins 数组中 ] }