module.exports = {
entry: {
vendors: "./src/vendor",
main: "./src/index.js",
auth: "./src/auth.js",
search: "./src/search.js",
cinema: "./src/cinema.js"
},
optimization: {
splitChunks: {
cacheGroups: {
vendors: {
test: /[\\/]node_modules[\\/]/,
name: "vendors",
chunks: "all"
}
},
},
runtimeChunk: "single",
}
这很好。但是Cinema.js和main.js的块具有重复的条目。请帮助我如何避免它。 我需要将重复的代码从Cinema.js移到main.js