forked from yanghuayi/vue-ts-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
50 lines (48 loc) · 1.12 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
const Mock = require('./src/mock/index');
module.exports = {
chainWebpack: (config) => {
'use strict';
config.module
.rule('tsx')
.test(/\.tsx$/)
.use('vue-jsx-hot-loader')
.before('babel-loader')
.loader('vue-jsx-hot-loader');
config.plugin('html').tap((args) => {
args[0].chunksSortMode = 'none';
return args;
});
},
css: {
loaderOptions: {
less: {
javascriptEnabled: true,
modifyVars: {
'primary-color': '#0390FF',
'border-radius-base': '3px',
'border-radius-sm': '2px',
'shadow-color': 'rgba(0,0,0,0.05)',
'shadow-1-down': '4px 4px 40px @shadow-color',
'border-color-split': '#f4f4f4',
'border-color-base': '#e5e5e5',
'font-size-base': '13px',
'text-color': '#666',
},
},
},
},
devServer: {
proxy: {
'/api': {
target: 'http://localhost:8080/api/', // 开发环境地址
changeOrigin: true,
pathRewrite: {
'^/api': '',
},
},
},
setup(app) {
Mock(app);
},
},
};