-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue.config.js
83 lines (77 loc) · 1.41 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
const
app = {
name: 'Stechus Kaktus – Romanizer',
meta: {
description: 'Just a simple roman numerals converter',
url: 'https://schascha.github.io/stechus-kaktus/'
}
}
;
module.exports = {
chainWebpack: (config) => {
config
.plugin('html')
.tap(args => {
args[0].title = app.name;
args[0].meta = app.meta;
return args;
});
// SVG
const svgRule = config.module.rule('svg');
svgRule.uses.clear();
svgRule.delete('type');
svgRule.delete('generator');
svgRule
.use('babel-loader')
.loader('babel-loader')
.end()
.use('vue-svg-loader')
.loader('vue-svg-loader');
},
css: {
loaderOptions: {
scss: {
additionalData: `
@import '@/scss/_variables.scss';
@import '@/scss/_mixins.scss';
`
}
}
},
pluginOptions: {
i18n: {
locales: ['en', 'de'],
fallbackLocale: 'en',
localeDir: 'locales',
enableInSFC: true
}
},
publicPath: process.env.NODE_ENV === 'production' ?
'/stechus-kaktus/' :
'/',
pwa: {
name: app.name,
themeColor: '#C19A5B',
manifestOptions: {
background_color: '#F5EFE1',
short_name: 'Stechus Kaktus',
shortcuts: [{
name: 'Challenge mode',
url: './#/challenge'
}]
},
workboxOptions: {
exclude: [
/\.map$/,
/manifest\.json$/
],
runtimeCaching: [
{
urlPattern: 'https://fonts.googleapis.com/.*',
handler: 'CacheFirst',
method: 'GET'
}
]
}
}
};