Add PWA Support

This commit is contained in:
2022-05-04 21:54:21 +02:00
parent 7091cfddef
commit d3a49eed49
7 changed files with 6291 additions and 9 deletions

View File

@ -2,10 +2,41 @@ import { fileURLToPath, URL } from "url";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { VitePWA } from "vite-plugin-pwa";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
plugins: [
vue(),
VitePWA({
registerType: "autoUpdate",
manifest: {
name: "Timetable",
description: "Timetable and Substitution plan viewer",
theme_color: "#212121",
background_color: "#353535",
display: "standalone",
icons: [
{
src: "/favicon.svg",
sizes: "512x512",
type: "image/svg+xml",
},
{
src: "/icon.png",
sizes: "512x512",
type: "image/png",
},
{
src: "/icon.png",
sizes: "512x512",
type: "image/png",
purpose: "any maskable",
},
],
},
}),
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),