-
Notifications
You must be signed in to change notification settings - Fork 18
/
vue.config.js
58 lines (49 loc) · 1.32 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
const webpack = require("webpack");
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: "./",
// 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.resolve.set("fallback", {
assert: false,
fs: false,
http: false,
https: false,
path: false,
stream: false,
util: false,
zlib: false,
});
config.plugin("clean").use(webpack.DefinePlugin, [
{
"process.browser": JSON.stringify(true),
},
]);
},
pwa: {
msTileColor: "#009688",
name: "Mininet Editor",
themeColor: "#009688",
workboxPluginMode: "GenerateSW",
},
};