-
Notifications
You must be signed in to change notification settings - Fork 70
/
vue.config.js
41 lines (40 loc) · 1.02 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
// https://cli.vuejs.org/zh/config/
const webpack = require('webpack')
module.exports = {
lintOnSave: false,
runtimeCompiler: true,
configureWebpack: {
resolve: {
alias: {
// node_modules/@vue/cli-service/lib/config/base.js 中已经配好的 @ 路径
'assets': '@/assets',
'components': '@/components',
'views': '@/views',
'jquery': 'jquery/dist/jquery.slim.js'
}
},
devServer: {
proxy: {
'/api/v1': {
changeOrigin: true,
secure: false,
// target: 'http://localhost:3000'
target: 'https://www.easy-mock.com/mock/5b18ccb77dddfa3903693dba'
},
'/sidekiq': {
changeOrigin: true,
secure: false,
target: 'http://localhost:3000'
}
}
},
plugins: [
new webpack.ProvidePlugin({
'$': 'jquery',
jQuery: 'jquery',
Popper: ['popper.js', 'default'],
'Util': 'exports-loader?Util!bootstrap/js/dist/util'
})
]
}
}