-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue.config.js
38 lines (36 loc) · 1.01 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
const path = require("path");
const CompressionPlugin = require("compression-webpack-plugin");
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? process.env.BASE_URL || "/" : "/",
transpileDependencies: ["vue-openpaas-components"],
configureWebpack: {
optimization: {
runtimeChunk: "single",
splitChunks: {
chunks: "all",
maxInitialRequests: Infinity,
minSize: 100000,
maxSize: 250000,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name(module) {
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
return `${packageName.replace("@", "")}`;
}
}
}
}
},
plugins: [new CompressionPlugin()],
resolve: {
alias: {
"%": path.resolve(__dirname, "tests"),
"%utils": path.resolve(__dirname, "tests", "unit", "utils")
}
}
},
devServer: {
disableHostCheck: true
}
};