-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
35 lines (35 loc) · 965 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
const autoprefixer = require('autoprefixer');
const path = require('path');
const env = process.env.NODE_ENV || 'development';
const resolve = dir => path.join(__dirname, dir);
// @see https://cli.vuejs.org/zh/config/
module.exports = {
publicPath: './', //部署应用包时的基本url路径, /代表根目录下,
chainWebpack: (config) => {
config.resolve.alias
.set('@', resolve('src'))
.set('_c', resolve('src/components'));
},
devServer: {
proxy: {
'/api': {
target: 'http://interface.36dian.top',
ws: true,
changeOrigin: true,
pathRewrite: {
'^/api': '/api'
}
}
},
compress: true
},
css: {
loaderOptions: {
postcss: {
plugins: [
autoprefixer(),
]
}
}
}
};