Skip to content

Commit

Permalink
fix: Only create one CSS file during builds to avoid problems caused …
Browse files Browse the repository at this point in the history
…by split CSS files loading in different orders (#11800)

Fixes #11072
  • Loading branch information
KyleAMathews committed Feb 15, 2019
1 parent 0f31481 commit 7058a25
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/gatsby/src/utils/webpack.config.js
Expand Up @@ -391,6 +391,18 @@ module.exports = async (
},
splitChunks: {
name: false,
cacheGroups: {
// Only create one CSS file to avoid
// problems with code-split CSS loading in different orders
// causing inconsistent/non-determanistic styling
// See https://github.com/gatsbyjs/gatsby/issues/11072
styles: {
name: `styles`,
test: /\.css$/,
chunks: `all`,
enforce: true,
},
},
},
minimizer: [
// TODO: maybe this option should be noMinimize?
Expand Down

0 comments on commit 7058a25

Please sign in to comment.