Webpack之多入口
webpack三种hash
1.全局hash: hash 修改一个地方所有文件hash都改变
2.内容hash: contentHash 根据自身文件修改了才会变hash
3.分组hash: chunkHash 根据多入口文件分组 不同组之间hash值不相影响, 组内文件修改,该组hash改变
module.exports = { entry: { main: './js/main.js', other: './js/other.js' }, output: { filename: '[name].[hash/contentHash/chunkHash].js', path: path.resolve(__dirname, 'dist') }, plugins: [ new HtmlWebpackPlugin({ filename: 'index.html', template: './src/index.html' }), new HtmlWebpackPlugin({ filename: 'other.html', template: './src/other.html' }), ] // ... }