Skip to content

Commit 5751131

Browse files
authored
Set allChunks: true by default (close #1110) (#1149)
* `allChunks: true` by default close #1110 * update wording.
1 parent 44ca398 commit 5751131

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

template/build/webpack.prod.conf.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ const webpackConfig = merge(baseWebpackConfig, {
4646
// extract css into its own file
4747
new ExtractTextPlugin({
4848
filename: utils.assetsPath('css/[name].[contenthash].css'),
49-
// set the following option to `true` if you want to extract CSS from
50-
// codesplit chunks into this main css file as well.
51-
// This will result in *all* of your app's CSS being loaded upfront.
52-
allChunks: false,
49+
// Setting the following option to `false` will not extract CSS from codesplit chunks.
50+
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
51+
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
52+
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
53+
allChunks: true,
5354
}),
5455
// Compress extracted CSS. We are using this plugin so that possible
5556
// duplicated CSS from different components can be deduped.

0 commit comments

Comments
 (0)