常阅 API
技术专题
工程化配置
主题
简化 HTML 文件的创建。
new HtmlWebpackPlugin({ template: 'public/index.html', // 模板文件 title: 'Webpack Demo', // 生成的 html title filename: 'index.html', // 生成的文件名 // 用于 <script> 和 <link> 的 publicPath // 默认 'auto' 为 webpackConfig.output.publicPath publicPath: 'auto' })