nostrudel/vite.config.ts

44 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-02-07 17:04:18 -06:00
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
2023-02-07 17:04:18 -06:00
import { VitePWA } from "vite-plugin-pwa";
2023-02-07 17:04:18 -06:00
// https://vitejs.dev/config/
export default defineConfig({
build: {
target: ["chrome89", "edge89", "firefox89", "safari15"],
},
2023-02-07 17:04:18 -06:00
plugins: [
react(),
VitePWA({
2023-02-07 17:04:19 -06:00
registerType: "prompt",
2023-02-07 17:04:18 -06:00
manifest: {
2023-02-07 17:04:19 -06:00
name: "noStrudel",
short_name: "noStrudel",
2023-02-07 17:04:18 -06:00
description: "A simple PWA nostr client",
2023-07-01 15:05:48 -05:00
orientation: "portrait-primary",
2023-02-07 17:04:19 -06:00
theme_color: "#8DB600",
2023-02-07 17:04:18 -06:00
categories: ["nostr"],
2023-02-07 17:04:18 -06:00
icons: [
{ src: "/favicon.ico", type: "image/x-icon", sizes: "16x16 32x32" },
{ src: "/icon-192.png", type: "image/png", sizes: "192x192" },
{ src: "/icon-512.png", type: "image/png", sizes: "512x512" },
{ src: "/icon-192-maskable.png", type: "image/png", sizes: "192x192", purpose: "maskable" },
{ src: "/icon-512-maskable.png", type: "image/png", sizes: "512x512", purpose: "maskable" },
],
// TODO: actually handle this share data
// @ts-ignore
share_target: {
action: "/share",
method: "GET",
2023-02-07 17:04:18 -06:00
enctype: "application/x-www-form-urlencoded",
2023-02-07 17:04:18 -06:00
params: {
title: "title",
text: "text",
url: "url",
},
},
2023-02-07 17:04:18 -06:00
},
}),
],
2023-02-07 17:04:18 -06:00
});