-
Notifications
You must be signed in to change notification settings - Fork 6
/
vue.config.js
61 lines (60 loc) · 1.49 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
50
51
52
53
54
55
56
57
58
59
60
61
const path = require("path");
function resolve(dir) {
return path.join(__dirname, dir);
}
module.exports = {
transpileDependencies: true,
chainWebpack: (config) => {
config.resolve.alias.set("@", resolve("src"));
config.module.rule("svg").exclude.add(resolve("src/icons")).end();
config.module
.rule("icons")
.test(/\.svg$/)
.include.add(resolve("src/icons"))
.end()
.use("svg-sprite-loader")
.loader("svg-sprite-loader")
.options({
symbolId: "icon-[name]",
})
.end();
},
lintOnSave: false,
productionSourceMap: false,
configureWebpack: {
module: {
rules: [
{
test: /\.md$/,
use: "text-loader",
},
],
},
},
css: {
loaderOptions: {
sass: {
additionalData: `@import "@/style/variables.scss";`,
},
},
},
devServer: {
host: "0.0.0.0", // 允许外部ip访问
port: 8033, // 端口
proxy: {
"/api": {
// target: "http://heart.ifr.fidt.top:61010",
// target: "http://brain.ifr.fidt.top:61010/",
target: "http://112.49.22.103:62222", //外网
// target: "http://192.168.60.117:8088", //仁柯
changeOrigin: true,
pathRewrite: {
"^/api": "",
},
},
},
},
publicPath: '/BCAGitPages',//github仓库名
assetsDir: 'BCAGitPages',//同上,否则访问不到静态资源
outputDir:"dist",
};