-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
62 lines (60 loc) · 1.55 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
59
60
61
62
module.exports = {
publicPath:
process.env.NODE_ENV === "production"
? "/" + process.env.VUE_APP_GH_REPO + "/"
: "/",
productionSourceMap: false,
chainWebpack: (config) => {
config.plugin("html").tap((args) => {
args[0].title = process.env.VUE_APP_GH_REPO;
args[0].author = process.env.VUE_APP_GH_OWNER;
args[0].reponame =
process.env.VUE_APP_GH_OWNER + "/" + process.env.VUE_APP_GH_REPO;
return args;
});
},
pwa: {
name: process.env.VUE_APP_GH_REPO,
themeColor: "#17181C",
msTileColor: "#17181C",
iconPaths: {
maskIcon: null,
favicon32: "img/icons/favicon-32x32.png",
favicon16: "img/icons/favicon-16x16.png",
msTileImage: null,
appleTouchIcon: "img/icons/apple-touch-icon.png",
},
manifestOptions: {
display: "standalone",
background_color: "#17181C",
icons: [
{
src: "./img/icons/android-chrome-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "./img/icons/android-chrome-512x512.png",
sizes: "512x512",
type: "image/png",
},
],
},
workboxPluginMode: "GenerateSW",
workboxOptions: {
skipWaiting: true,
clientsClaim: true,
navigateFallback: "index.html",
runtimeCaching: [
{
urlPattern: /^http.*github/,
handler: "NetworkFirst",
options: {
cacheName: "api-cache",
networkTimeoutSeconds: 2,
},
},
],
},
},
};