fix(webpack): chunkhash and contenthash not work with extractCSS (#6520)

This commit is contained in:
Xin Du (Clark) 2019-10-08 09:34:40 +01:00 committed by Pooya Parsa
parent 9b1ce93e6a
commit ed564c3bd8

View File

@ -84,13 +84,14 @@ export default class StyleLoader {
extract () {
if (this.extractCSS) {
const isDev = this.buildContext.options.dev
return {
loader: ExtractCssChunksPlugin.loader,
options: {
// TODO: https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/issues/132
// https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/issues/161#issuecomment-500162574
reloadAll: true,
hot: true
reloadAll: isDev,
hot: isDev
}
}
}