Skip to content

Commit b3bc8e4

Browse files
mgenwarefrandiox
authored andcommitted
Set ExtractTextPlugin.allChunks to true (vuejs-templates#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 53ef0dd commit b3bc8e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

template/build/webpack.prod.conf.js

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

0 commit comments

Comments
 (0)