forked from siacentral/sia-lite-wallet-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
46 lines (40 loc) · 1 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
const path = require('path');
module.exports = {
parallel: false,
pwa: {
name: 'Sia Lite Wallet',
themeColor: '#1d1e21',
msTileColor: '#1d1e21',
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black-translucent',
manifestOptions: {
background_color: '#1d1e21'
}
},
chainWebpack: config => {
config.output.publicPath = `${process.cwd()}/dist/`;
const svgRule = config.module.rule('svg');
const types = ['vue-modules', 'vue', 'normal-modules', 'normal'];
svgRule.uses.clear();
svgRule
.use('vue-svg-loader')
.loader('vue-svg-loader')
.options({
svgo: false
});
config.module.rule('worker')
.test(/\.worker\.js$/i)
.use('worker-loader')
.loader('worker-loader');
types.forEach(type => addStyleResource(config.module.rule('stylus').oneOf(type)));
}
};
function addStyleResource(rule) {
rule.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/styles/vars.styl')
]
});
}