2021-12-08 21:44:57 +01:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
|
import react from "@vitejs/plugin-react";
|
2021-12-21 18:40:35 +01:00
|
|
|
import { VitePWA, VitePWAOptions } from "vite-plugin-pwa";
|
|
|
|
|
|
|
|
|
|
const pwaOptions: Partial<VitePWAOptions> = {
|
|
|
|
|
registerType: "autoUpdate",
|
|
|
|
|
includeAssets: [
|
|
|
|
|
"favicon.svg",
|
|
|
|
|
"favicon.ico",
|
|
|
|
|
"robots.txt",
|
|
|
|
|
"apple-touch-icon.png",
|
|
|
|
|
],
|
|
|
|
|
manifest: {
|
|
|
|
|
name: "Walk-up alarm",
|
2021-12-21 18:45:41 +01:00
|
|
|
short_name: "Walk-up alarm",
|
|
|
|
|
theme_color: "#3E3D42",
|
2021-12-21 18:40:35 +01:00
|
|
|
icons: [
|
|
|
|
|
{
|
|
|
|
|
src: "pwa-192x192.png",
|
|
|
|
|
sizes: "192x192",
|
|
|
|
|
type: "image/png",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: "pwa-512x512.png",
|
|
|
|
|
sizes: "512x512",
|
|
|
|
|
type: "image/png",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: "pwa-512x512.png",
|
|
|
|
|
sizes: "512x512",
|
|
|
|
|
type: "image/png",
|
|
|
|
|
purpose: "any maskable",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
2021-12-08 21:44:57 +01:00
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
|
export default defineConfig({
|
2021-12-13 20:17:10 +01:00
|
|
|
base: "/walk-up-alarm/",
|
2021-12-21 18:40:35 +01:00
|
|
|
plugins: [react(), VitePWA(pwaOptions)],
|
2021-12-08 21:44:57 +01:00
|
|
|
});
|