-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvue.config.js
48 lines (46 loc) · 1.08 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
47
48
module.exports = {
devServer: {
// port: 80,
proxy: {
"/api": {
target: "https://jsonplaceholder.typicode.com",
ws: true,
changeOrigin: true,
pathRewrite: path => {
return path.replace("api/", "");
}
}
}
},
pluginOptions: {
i18n: {
locale: "en",
fallbackLocale: "en",
localeDir: "locales",
enableInSFC: true
}
},
chainWebpack: config => {
if (process.env.NODE_ENV === "test") {
config.module.rule("scss").uses.clear();
config.module
.rule("scss")
.use("null-loader")
.loader("null-loader");
}
config.optimization.minimizer("terser").tap(args => {
const { terserOptions } = args[0];
// eslint-disable-next-line @typescript-eslint/camelcase
terserOptions.keep_classnames = true;
// eslint-disable-next-line @typescript-eslint/camelcase
terserOptions.keep_fnames = true;
return args;
});
config.module
.rule("eslint")
.use("eslint-loader")
.options({
fix: true
});
}
};