Updating latest
This commit is contained in:
@@ -40,24 +40,24 @@ module.exports = merge(common, {
|
||||
],
|
||||
optimization: {
|
||||
minimizer: [new UglifyJsPlugin(), new OptimizeCssAssetsPlugin()],
|
||||
runtimeChunk: "single",
|
||||
splitChunks: {
|
||||
chunks: "all",
|
||||
cacheGroups: {
|
||||
vendor: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name(module) {
|
||||
// get the name. E.g. node_modules/packageName/not/this/part.js
|
||||
// or node_modules/packageName
|
||||
const packageName = module.context.match(
|
||||
/[\\/]node_modules[\\/](.*?)([\\/]|$)/
|
||||
)[1];
|
||||
// runtimeChunk: "single",
|
||||
// splitChunks: {
|
||||
// chunks: "all",
|
||||
// cacheGroups: {
|
||||
// vendor: {
|
||||
// test: /[\\/]node_modules[\\/]/,
|
||||
// name(module) {
|
||||
// // get the name. E.g. node_modules/packageName/not/this/part.js
|
||||
// // or node_modules/packageName
|
||||
// const packageName = module.context.match(
|
||||
// /[\\/]node_modules[\\/](.*?)([\\/]|$)/
|
||||
// )[1];
|
||||
|
||||
// npm package names are URL-safe, but some servers don't like @ symbols
|
||||
return `vendor.${packageName.replace("@", "")}`;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
// // npm package names are URL-safe, but some servers don't like @ symbols
|
||||
// return `vendor.${packageName.replace("@", "")}`;
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user