-
Notifications
You must be signed in to change notification settings - Fork 185
/
vue.config.js
53 lines (47 loc) · 1.23 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
const HtmlWebpackInlineSourcePlugin = require('webpack-inline-modern-source-plugin')
const pkg = require('./package.json')
process.env.VUE_APP_VERSION = `v${pkg.version}@${Date.now().toString('36')}`
const isProd = (process.env.NODE_ENV === 'production')
const plugins = isProd
? [new HtmlWebpackInlineSourcePlugin()]
: []
module.exports = {
pwa: {
name: 'Empresas que usam Vue.js no Brasil',
themeColor: '#40b882',
msTileColor: '#35495e',
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black',
assetsVersion: pkg.version,
workboxOptions: {
cacheId: `${pkg.name}@${pkg.version}`,
clientsClaim: true,
skipWaiting: true,
cleanupOutdatedCaches: true,
exclude: /(_redirects|_headers|cover.png|robots.txt|icons\/apple)/
}
},
chainWebpack (config) {
config
.plugin('html')
.tap(args => {
args[0].inlineSource = '(/css/root.*.css)$'
return args
})
},
configureWebpack: {
plugins,
optimization: {
splitChunks: {
cacheGroups: {
'lodash-es': {
priority: 6,
test: /\/lodash-es/,
name: 'lodash-es',
chunks: 'all'
}
}
}
}
}
}