Skip to content

Commit dfe3987

Browse files
committed
feat!: enable splitChunks by default even in development mode (#3863)
BREAKING CHANGE: This changes the output directory structures for development mode (app.js -> index.js + chunk-common.js + chunk-vendors.js). By enabling splitChunks by default, the memory usage of webpack may be greatly reduced for large multi-page projects. This commit fixes #3838 May also fix #2991
1 parent 3495aa2 commit dfe3987

File tree

1 file changed

+1
-1
lines changed
  • packages/@vue/cli-service/lib/config

1 file changed

+1
-1
lines changed

packages/@vue/cli-service/lib/config/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = (api, options) => {
2424
const outputDir = api.resolve(options.outputDir)
2525

2626
// code splitting
27-
if (isProd && !process.env.CYPRESS_ENV) {
27+
if (process.env.NODE_ENV !== 'test') {
2828
webpackConfig
2929
.optimization.splitChunks({
3030
cacheGroups: {

0 commit comments

Comments
 (0)