Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
webpack splitchunk 例
optimization : {
splitChunks : {
name : false,
cacheGroups : {
default : false,
vendors : {
test : /node_modules/,
chunks (chunk) {
return chunk.name !== 'js/preload'
},
filename : 'js/vendor.js',
enforce : true
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment