-
Notifications
You must be signed in to change notification settings - Fork 218
/
Copy pathvue.config.js
45 lines (41 loc) · 885 Bytes
/
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
"use strict";
const path = require("path");
const config = require("./config");
function resolve(dir) {
return path.join(__dirname, dir);
}
const NODE_ENV = process.env.NODE_ENV;
const { mockUrl } = config[NODE_ENV];
const isDev = NODE_ENV === "development";
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
publicPath: "/",
outputDir: "dist",
assetsDir: "static",
lintOnSave: isDev,
devServer: {
overlay: {
warnings: false,
errors: true,
},
proxy: {
"/dev-api": {
target: mockUrl,
pathRewrite: {
"^/dev-api": "/",
},
secure: false,
changeOrigin: true,
},
},
},
configureWebpack: {
devtool: "source-map",
name: "vue-h5-template",
resolve: {
alias: {
"@": resolve("src"),
},
},
},
};