-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathvue.config.js
64 lines (63 loc) · 1.46 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
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')
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules\/(?!(@starport|@cosmjs|cosmjs-types)\/).*/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ['@babel/plugin-proposal-numeric-separator', '@babel/plugin-proposal-optional-chaining']
}
}
}
]
}
}
}