1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 15:19:41 +02:00

Support PWA (#437)

* add PWA

* cleanup

* add offline cache
This commit is contained in:
wengtad 2021-05-28 00:48:59 +08:00 committed by GitHub
parent 8e7a17b1bb
commit 39baca4462
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 1034 additions and 45 deletions

View file

@ -1,4 +1,5 @@
const path = require("path");
const manifestJSON = require("./public/manifest.json");
module.exports = {
transpileDependencies: ["vuetify"],
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
@ -26,4 +27,17 @@ module.exports = {
},
},
},
pwa: {
name: manifestJSON.short_name,
themeColor: manifestJSON.theme_color,
msTileColor: manifestJSON.background_color,
appleMobileWebAppCapable: "yes",
appleMobileWebAppStatusBarStyle: "black",
workboxPluginMode: "InjectManifest",
workboxOptions: {
swSrc: "./src/sw.js",
swDest: "service-worker.js",
},
},
};