forked from fluidd-core/fluidd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
48 lines (46 loc) · 1.3 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
/* eslint-disable @typescript-eslint/no-var-requires */
const { IgnorePlugin } = require('webpack')
const GenerateFilePlugin = require('generate-file-webpack-plugin')
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const v = require('./package.json').version
const h = require('child_process')
.execSync('git rev-parse --short HEAD')
.toString()
module.exports = {
pwa: {
themeColor: '#2196F3',
msTileColor: '#000000',
appleMobileWebAppCache: 'yes',
manifestOptions: {
background_color: '#000000'
}
},
transpileDependencies: [
'vuetify'
],
configureWebpack: {
resolve: {
symlinks: false // Don't follow symlinks, fixes issues when using npm link.
},
plugins: [
new IgnorePlugin(/^\.\/locale$/, /moment$/), // Ignore all moment locales (comes from chartjs)
new GenerateFilePlugin({
file: '.version',
content: v + '\n'
})
// new BundleAnalyzerPlugin({
// analyzerMode:
// (process.env.NODE_ENV === 'production') ? 'server' : 'disabled'
// })
]
},
chainWebpack: config => {
config
.plugin('define')
.tap(args => {
args[0]['process.env'].VERSION = JSON.stringify(v)
args[0]['process.env'].HASH = JSON.stringify(h)
return args
})
}
}