Notes/client/vite.config.ts
Claudio Schaad 39f7eb8804 Add a real PWA icon (notes glyph) instead of a flat color placeholder
The generated icons were solid brand-blue squares with no glyph.
gen-icons.py now procedurally draws a page/notes icon (folded corner,
text lines) with anti-aliasing, kept within the maskable-icon safe
zone so Android's adaptive-icon masks don't clip it. Also adds an
apple-touch-icon and wires favicon/apple-touch-icon links into
index.html, and marks manifest icons purpose "any maskable".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C3DGg1pvmvf81zXs4pk1J7
2026-08-27 17:54:17 +02:00

44 lines
1.1 KiB
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
includeAssets: ["icons/icon-192.png", "icons/icon-512.png", "icons/apple-touch-icon.png"],
manifest: {
name: "Reading Notes",
short_name: "Notes",
description: "Jot down short notes while reading, saved straight to Nextcloud.",
start_url: "/",
display: "standalone",
background_color: "#ffffff",
theme_color: "#1f6feb",
icons: [
{
src: "icons/icon-192.png",
sizes: "192x192",
type: "image/png",
purpose: "any maskable"
},
{
src: "icons/icon-512.png",
sizes: "512x512",
type: "image/png",
purpose: "any maskable"
}
]
}
})
],
server: {
proxy: {
"/api": {
target: "http://localhost:3000",
changeOrigin: true
}
}
}
});