forked from Thomaash/me
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
51 lines (43 loc) · 1.14 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
const WorkerPlugin = require('worker-plugin')
const { execSync } = require('child_process')
process.env.VUE_APP_BUILD_DATE = new Date().toISOString()
process.env.VUE_APP_BUILD_COMMIT_HASH = execSync('git log -1 --format=%H', {
encoding: 'ascii'
}).trim()
process.env.VUE_APP_BUILD_COMMIT_DATE = new Date(
execSync("git log -1 --format=%ct", {
encoding: "ascii",
}).trim() * 1000
).toISOString();
module.exports = {
publicPath: process.env.NODE_ENV === 'production'
? '/me'
: '/',
// Do not fail the build with linting errors. It sometimes reports errors
// that are simply not there.
lintOnSave: 'warning',
// There are issues with parallelism in CircleCI.
parallel: !process.env.CIRCLECI,
transpileDependencies: [
'vuetify',
'vuex-ltm'
],
chainWebpack: config => {
config
.module
.rule('txt')
.test(/(\.(txt|py)$|^[^.]+$)/)
.use('raw')
.loader('raw-loader')
.end()
config
.plugin('worker-plugin')
.use(WorkerPlugin)
},
pwa: {
msTileColor: '#009688',
name: 'Mininet Editor',
themeColor: '#009688',
workboxPluginMode: 'GenerateSW'
}
}