forked from fluidd-core/fluidd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
63 lines (61 loc) · 1.5 KB
/
vue.config.js
File metadata and controls
63 lines (61 loc) · 1.5 KB
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
/* eslint-disable @typescript-eslint/no-var-requires */
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 = {
pluginOptions: {
i18n: {
locale: 'en',
fallbackLocale: 'en',
localeDir: 'locales',
enabbleInSFC: false
}
},
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 GenerateFilePlugin({
file: '.version',
content: 'v' + v + '\n'
})
// new BundleAnalyzerPlugin({
// analyzerMode:
// (process.env.NODE_ENV === 'production') ? 'server' : 'disabled'
// })
]
},
chainWebpack: config => {
config.module
.rule('i18n-loader')
.test(/.\.yaml$/)
.use('json')
.loader('json-loader')
.end()
.use('yaml')
.loader('yaml-loader')
.end()
config
.plugin('define')
.tap(args => {
args[0]['process.env'].VERSION = JSON.stringify(v)
args[0]['process.env'].HASH = JSON.stringify(h)
return args
})
}
}