-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
49 lines (46 loc) · 1.13 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
49
const path = require("path");
const isDev = process.env.NODE_ENV === "development";
const port = 8000;
module.exports = {
publicPath: isDev ? "/" : "/hh-render/",
assetsDir: "static",
filenameHashing: true,
lintOnSave: isDev, // 把eslint校验打开, vscode安装eslint插件
productionSourceMap: false,
configureWebpack: {
// module: {
// rules: [],
// },
resolve: {
alias: {
"@": path.resolve(process.cwd(), "./src"),
},
},
devServer: {
// proxy: {
// "/cst_wms_new": {
// target: process.env.VUE_APP_BASE_URL,
// 联调后端本地接口时打开下面注释
// pathRewrite: {
// '^/cst_wms_new': '',
// },
// },
// "/auth": {
// // target: process.env.VUE_APP_AUTH_URL,
// },
// },
headers: {
"Access-Control-Allow-Origin": "*",
},
disableHostCheck: true,
sockPort: 8001,
sockHost: "localhost",
https: false,
port: port,
},
},
chainWebpack: (config) => {
config.plugins.delete("preload");
config.plugins.delete("prefetch");
},
};