-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
46 lines (45 loc) · 1.15 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module.exports = {
transpileDependencies: [true],
configureWebpack: {
optimization: {
splitChunks: {
chunks: "all",
maxInitialRequests: Infinity,
minSize: 20000,
maxSize: 0,
minChunks: 1,
maxAsyncRequests: 30,
enforceSizeThreshold: 50000,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
chunks: "all",
name(module) {
const packageName = module.context.match(
/[\\/]node_modules[\\/](.*?)([\\/]|$)/
)[1];
return `vendor.${packageName.replace("@", "")}`;
},
reuseExistingChunk: true,
},
},
},
}
},
// chainWebpack: (config) => {
// config.module
// .rule("vue")
// .use("vue-loader")
// .tap((options) => {
// return {
// ...options,
// compilerOptions: {
// isCustomElement: (tag) => {
// console.log(tag, tag.startsWith("hms-"));
// return tag.startsWith("hms-");
// },
// },
// };
// });
// },
};