Last active
April 3, 2020 16:42
-
-
Save evenstensberg/b2b1a502718f5dc7af7d8e2933483f20 to your computer and use it in GitHub Desktop.
Example Chunk Splitting Strategy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
optimization: { | |
splitChunks: { | |
cacheGroups: { | |
vendor: { | |
name: 'vendor', | |
test: /[\\/]node_modules[\\/]/, | |
chunks: 'all', | |
maxSize: 500000 | |
}, | |
styles: { | |
name: 'styles', | |
test: /\.css$/, | |
chunks: 'all' | |
} | |
} | |
}, | |
runtimeChunk: true, | |
sideEffects: true | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment