hash
[hash] is replaced by the hash of the compilation(). 代表的是cpmpilation的hash。
compilation在项目中任何一个文件改动后就会被重新创建,然后webpack计算新的compilation的hash值,这个hash值便是hash。
chunkhash
[chunkhash] is replaced by the hash of the chunk. chunk(模块)的hash
代表的是chunk(模块)的hash值。
contenthash
插件extract-text-webpack-plugin
引入的contenthash
名称 | 说明 |
---|---|
hash | 代表的是compilation的hash值。compilation在项目中任何一个文件改动后就会被重新创建,然后webpack计算新的compilation的hash值 |
chunkhash | 代表chunk的hash,模块发生改变才会重新生成hash |
contenthash | 解决改变style文件导致js文件重新生成hash的问题(使用extract-text-webpack-plugin单独编译输出css文件) |