Skip to content

Commit 626bc98

Browse files
mgenwareLinusBorg
authored andcommitted
Set ExtractTextPlugin.allChunks to true (#1027)
* When using CommonsChunkPlugin and there are extracted chunks (from ExtractTextPlugin.extract) in the commons chunk, allChunks must be set to true https://github.com/webpack-contrib/extract-text-webpack-plugin * Explicitly set allChunks to false along with some useful info on codesplit chunks (credit to @LinusBorg) * Update webpack.prod.conf.js
1 parent db75f1f commit 626bc98

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: template/build/webpack.prod.conf.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ const webpackConfig = merge(baseWebpackConfig, {
4343
}),
4444
// extract css into its own file
4545
new ExtractTextPlugin({
46-
filename: utils.assetsPath('css/[name].[contenthash].css')
46+
filename: utils.assetsPath('css/[name].[contenthash].css'),
47+
// set the following option to `true` if you want to extract CSS from
48+
// codesplit chunks into this main css file as well.
49+
// This will result in *all* of your app's CSS being loaded upfront.
50+
allChunks: false,
4751
}),
4852
// Compress extracted CSS. We are using this plugin so that possible
4953
// duplicated CSS from different components can be deduped.

0 commit comments

Comments
 (0)