Answer the question
In order to leave comments, you need to log in
How to merge chunk and bundle correctly?
Hello everyone, in short, I want to combine the bundle and the chunk, i.e. I put all the necessary node_modules in one bundle and the main code there, it turns out something like this:
webpackConfig.entry = {
{
"core": "./src/app/main.js",
"entryA": "./src/chunkA/chunkA.js",
"entryB": "./src/chunkB/chunkB.js"
}
module.exports = {
optimization: {
splitChunks: {
cacheGroups: {
default: false,
core: {
name: 'core',
chunks: 'all',
test: /node_modules/,
}
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question