Improve PWA support.

This commit is contained in:
FireMasterK
2021-12-28 19:39:02 +00:00
parent ce4be5d217
commit b32e868e8f
5 changed files with 103 additions and 84 deletions

View File

@@ -13,7 +13,34 @@ export default defineConfig({
vueI18n({
include: path.resolve(__dirname, "./src/locales/**"),
}),
VitePWA({ registerType: "autoUpdate" }),
VitePWA({
registerType: "autoUpdate",
workbox: {
globPatterns: ["**/*.{js,css,html,ico,svg,png}", "manifest.webmanifest"],
},
manifest: {
name: "Piped",
short_name: "Piped",
background_color: "#000000",
theme_color: "#fa4b4b",
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" },
{
src: "./img/icons/android-chrome-maskable-192x192.png",
sizes: "192x192",
type: "image/png",
purpose: "maskable",
},
{
src: "./img/icons/android-chrome-maskable-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
}),
],
resolve: {
alias: {