-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
vue.config.js
85 lines (80 loc) · 2.17 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
84
85
// Compress static text assets at build time
const CompressionPlugin = require('compression-webpack-plugin')
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin')
module.exports = {
pluginOptions: {
webpackBundleAnalyzer: {
openAnalyzer: false
}
},
devServer: {
// setting to fix gitpod Ivalid Host Header error
disableHostCheck: true
},
publicPath: '/',
configureWebpack: {
optimization: {
moduleIds: 'hashed',
runtimeChunk: 'single',
splitChunks: {
minSize: 10000,
maxSize: 50000,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all'
}
}
}
}
},
pwa: {
name: 'Ambianic UI',
themeColor: '#179aff',
msTileColor: '#179aff',
appleMobileWebAppCapable: 'yes',
iconPaths: {
favicon32: 'img/icons/favicon-32x32.png',
favicon16: 'img/icons/favicon-16x16.png',
appleTouchIcon: 'img/icons/apple-touch-icon-152x152.png',
maskIcon: 'img/icons/safari-pinned-tab.svg',
msTileImage: 'img/icons/msapplication-icon-144x144.png'
},
workboxPluginMode: 'GenerateSW',
workboxOptions: {
exclude: ['/.map$/', '/_redirects/', 'netlify.toml'],
runtimeCaching: [
{
urlPattern: new RegExp('https://fonts.(?:googleapis|gstatic).com/(.*)'),
handler: 'CacheFirst',
options: {
cacheName: 'google-fonts',
expiration: {
maxEntries: 30
},
cacheableResponse: {
statuses: [
0,
200
]
}
}
}
]
}
},
transpileDependencies: [
'vuetify'
],
chainWebpack (config) {
// Improve first page loading time
// ref: https://medium.com/@aetherus.zhou/vue-cli-3-performance-optimization-55316dcd491c
config.plugins.delete('prefetch')
// enable build time compression
config.plugin('CompressionPlugin').use(CompressionPlugin)
// VuetifyLoaderPlugin
config.plugin('VuetifyLoaderPlugin').use(VuetifyLoaderPlugin)
},
productionSourceMap: false
}