-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
74 lines (71 loc) · 1.73 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
62
63
64
65
66
67
68
69
70
71
72
73
74
const { IgnorePlugin } = require('webpack')
const WebpackNotifierPlugin = require('./webpack/webpack-notifier-plugin')
module.exports = {
publicPath: './',
configureWebpack: {
plugins: [
new IgnorePlugin(/^\.\/locale$/, /moment$/),
new WebpackNotifierPlugin(),
],
},
chainWebpack: config => {
config.resolve.alias
.set('@root', __dirname)
config.plugin('copy').tap(args => {
args[0][0].ignore.push('DevTest.vue')
return args
})
config.module.rule('svg')
.uses
.clear()
.end()
.oneOf('component')
.resourceQuery(/component/)
.use('babel-loader')
.loader('babel-loader')
.end()
.use('vue-svg-loader')
.loader('vue-svg-loader')
.end()
.end()
.oneOf('datauri')
.resourceQuery(/datauri/)
.use('inline-svgo-loader')
.loader('inline-svgo-loader')
.end()
.end()
.oneOf('file')
.use('file-loader')
.loader('file-loader')
.options({
name: 'img/[name].[hash:8].[ext]',
})
},
css: {
loaderOptions: {
less: {
lessOptions: {
modifyVars: {
// 'primary-color': '#F5222D',
// 'link-color': '#F5222D',
// 'border-radius-base': '4px',
},
javascriptEnabled: true,
},
},
},
},
devServer: {
proxy: {
[process.env.VUE_APP_BASE_API]: {
target: process.env.DEV_SERVER,
changeOrigin: true,
pathRewrite: { [`^${process.env.VUE_APP_BASE_API}`]: '' },
},
},
before: process.env.NODE_ENV === 'development' ? require('./mock/mock-server') : null,
},
productionSourceMap: false,
lintOnSave: false,
transpileDependencies: [],
}