mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-24 21:38:32 +02:00
Improve dynamic webmanifest setup
This commit is contained in:
parent
d7aacb8b24
commit
000a3e005c
3 changed files with 10 additions and 13 deletions
|
@ -3,7 +3,7 @@ import { defineConfig } from "vite";
|
|||
import react from "@vitejs/plugin-react";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
|
||||
export default defineConfig(() => ({
|
||||
export default defineConfig(({ mode }) => ({
|
||||
build: {
|
||||
outDir: "build",
|
||||
assetsDir: "static/media",
|
||||
|
@ -43,24 +43,15 @@ export default defineConfig(() => ({
|
|||
}),
|
||||
],
|
||||
},
|
||||
manifest: {
|
||||
name: "ntfy web",
|
||||
short_name: "ntfy",
|
||||
description:
|
||||
"ntfy lets you send push notifications via scripts from any computer or phone. Made with ❤ by Philipp C. Heckel, Apache License 2.0, source at https://heckel.io/ntfy.",
|
||||
// The actual prod manifest is served from the go server, see server.go handleWebManifest.
|
||||
manifest: mode === "development" && {
|
||||
theme_color: "#317f6f",
|
||||
start_url: "/",
|
||||
icons: [
|
||||
{
|
||||
src: "/static/images/pwa-192x192.png",
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
src: "/static/images/pwa-512x512.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue