forked from rsksmart/rsk-stats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
43 lines (40 loc) · 1.01 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
const pkg = require('./package.json')
module.exports = {
configureWebpack: {
externals: { primus: 'Primus' }
},
chainWebpack: config => {
config
.plugin('define')
.tap(args => {
const WS_URL = process.env.WS_URL || 'wss://backend.stats.rsk.co'
args[0]['process.env'] = Object.assign(args[0]['process.env'], {
WS_URL: JSON.stringify(WS_URL),
APP: {
name: JSON.stringify(pkg.name),
version: JSON.stringify(pkg.version)
}
})
return args
})
const svgRule = config.module.rule('svg')
svgRule.uses.clear()
svgRule
.oneOf('inline')
.resourceQuery(/inline/)
.use('vue-svg-loader')
.loader('vue-svg-loader')
.end()
.resourceQuery(/raw/)
.use('vue-svg-loader')
.loader('raw-loader')
.end()
.end()
.oneOf('external')
.use('file-loader')
.loader('file-loader')
.options({
name: 'assets/[name].[hash:8].[ext]'
})
}
}