Skip to content

Commit

Permalink
fix style bundle filename in dev mode (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip authored Jan 28, 2020
1 parent 5d05c01 commit 3e6209c
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,15 @@ module.exports = function() {
});
}

const styleBundleFilename =
process.env.WEBPACK_DEV || archetype.babel.hasMultiTargets
? "[name].style.css"
: "[name].style.[contenthash].css";

return {
module: { rules },
plugins: [
new MiniCssExtractPlugin({
filename: archetype.babel.hasMultiTargets ? "[name].style.css" : "[name].style.[contenthash].css"
}),
new MiniCssExtractPlugin({ filename: styleBundleFilename }),
isProduction && new OptimizeCssAssetsPlugin(archetype.webpack.optimizeCssOptions),
new webpack.LoaderOptionsPlugin({
minimize: true,
Expand Down

0 comments on commit 3e6209c

Please sign in to comment.