Updating latest

This commit is contained in:
2020-05-29 03:56:59 +01:00
parent ac999629f1
commit edcd493ea7
14 changed files with 104 additions and 80 deletions

View File

@@ -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("@", "")}`;
// },
// },
// },
// },
},
});