-
Notifications
You must be signed in to change notification settings - Fork 8
/
vue.config.js
52 lines (48 loc) · 954 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
const path = require('path')
const webpack = require('webpack');
const fs = require('fs')
const packageJson = fs.readFileSync('./package.json')
const version = JSON.parse(packageJson).version || 0
module.exports = {
productionSourceMap: false,
devServer: {
disableHostCheck: true,
proxy: {
"/api": {
target: "http://localhost:26640",
pathRewrite: {
'^/api': '/'
}
},
'/rpc' : {
target: 'http://localhost:26657',
pathRewrite: {
'^/rpc': '/'
},
changeOrigin: true,
ws: true,
},
'/websocket' : {
target: 'http://localhost:26657',
changeOrigin: true,
ws: true,
upgrade: true,
}
},
},
configureWebpack: {
plugins: [
new webpack.DefinePlugin({
'process.env': {
PACKAGE_VERSION: '"' + version + '"'
}
})
],
resolve: {
symlinks: false,
alias: {
vue$: path.resolve('./node_modules/vue/dist/vue.esm-bundler.js')
}
}
}
}