Answer the question
In order to leave comments, you need to log in
How to merge all common modules into one of the chunks?
Hello everyone, there are multiple entry points:
webpackConfig.entry = {
{
"core": ["./src/app/main.js", jquery],
"chunkA": "./src/chunkA/chunkA.js",
"chunkB": "./src/chunkB/chunkB.js",
}
webpackConfig.entry = {
{
"core": ["./src/app/main.js", jquery],
"chunkA": "./src/chunkA/chunkA.js",
"chunkB": "./src/chunkB/chunkB.js",
}
....
new webpack.optimize.CommonsChunkPlugin({name: 'core'}),
...
let output = {
path: path.resolve(__dirname, 'dist'),
filename,
library: ['Module', '[name]'],
}
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