56 lines
1.4 KiB
TypeScript
56 lines
1.4 KiB
TypeScript
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
import { VitePWA } from "vite-plugin-pwa";
|
|
import svgr from "vite-plugin-svgr";
|
|
|
|
export default defineConfig({
|
|
base: "",
|
|
plugins: [
|
|
react(),
|
|
svgr(),
|
|
VitePWA({
|
|
registerType: "autoUpdate",
|
|
devOptions: {
|
|
enabled: true,
|
|
},
|
|
includeAssets: ["favicon.ico", "favicon.svg", "apple-touch-icon-180x180.png"],
|
|
manifest: {
|
|
name: "Spoolman",
|
|
short_name: "Spoolman",
|
|
description: "Keep track of your inventory of 3D-printer filament spools.",
|
|
icons: [
|
|
{
|
|
src: "pwa-64x64.png",
|
|
sizes: "64x64",
|
|
type: "image/png",
|
|
},
|
|
{
|
|
src: "pwa-192x192.png",
|
|
sizes: "192x192",
|
|
type: "image/png",
|
|
},
|
|
{
|
|
src: "pwa-512x512.png",
|
|
sizes: "512x512",
|
|
type: "image/png",
|
|
},
|
|
{
|
|
src: "maskable-icon-512x512.png",
|
|
sizes: "512x512",
|
|
type: "image/png",
|
|
purpose: "maskable",
|
|
},
|
|
],
|
|
background_color: "#1F1F1F",
|
|
theme_color: "#DC7734",
|
|
display: "standalone",
|
|
start_url: "/",
|
|
scope: "/",
|
|
},
|
|
workbox: {
|
|
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
|
|
},
|
|
}),
|
|
],
|
|
});
|