1
shiye515 2016-01-19 14:44:29 +08:00 via Android
你看下 output 中的 filename 和 chunkfilename 的文档 ,给静态资源加 hash 这个功能自带的
|
3
shiye515 2016-01-22 09:56:14 +08:00
HtmlWebpackPlugin inject: true,
|
4
123s OP @shiye515 用过这个,如果是传统页面,不是要写 N 个配置?
Generating Multiple HTML Files To generate more than one HTML file, declare the plugin more than once in your plugins array: { entry: 'index.js', output: { path: 'dist', filename: 'index_bundle.js' }, plugins: [ new HtmlWebpackPlugin(), // Generates default index.html new HtmlWebpackPlugin({ // Also generate a test.html filename: 'test.html', template: 'src/assets/test.html' }) ] } |