mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
26013f8dfa
- Add adaptive solid color background support for dark/light themes. - Replace mesh gradient with semi-transparent blurred background images. - Fix background scrolling issue on mobile browsers. - Remove borders from specific cards for consistent UI styling. - Prevent caching of PWA service worker files in Nginx. - Introduce interactive toast prompt for PWA updates instead of silent refresh.
68 lines
1.5 KiB
TypeScript
68 lines
1.5 KiB
TypeScript
import path from "path";
|
|
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { VitePWA } from "vite-plugin-pwa";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: "prompt",
|
|
injectRegister: "auto",
|
|
includeAssets: ["favicon.ico", "apple-touch-icon.png"],
|
|
manifest: {
|
|
name: "FLVX",
|
|
short_name: "FLVX",
|
|
description: "FLVX forwarding management panel",
|
|
theme_color: "#2563eb",
|
|
background_color: "#f6f7fb",
|
|
display: "standalone",
|
|
start_url: "/",
|
|
scope: "/",
|
|
icons: [
|
|
{
|
|
src: "pwa-192x192.png",
|
|
sizes: "192x192",
|
|
type: "image/png",
|
|
},
|
|
{
|
|
src: "pwa-512x512.png",
|
|
sizes: "512x512",
|
|
type: "image/png",
|
|
},
|
|
{
|
|
src: "pwa-maskable-512x512.png",
|
|
sizes: "512x512",
|
|
type: "image/png",
|
|
purpose: "maskable",
|
|
},
|
|
],
|
|
},
|
|
workbox: {
|
|
navigateFallback: "/index.html",
|
|
cleanupOutdatedCaches: true,
|
|
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
|
|
},
|
|
}),
|
|
],
|
|
base: "/",
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
host: "0.0.0.0",
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
sourcemap: false,
|
|
minify: false,
|
|
rollupOptions: {
|
|
treeshake: false,
|
|
},
|
|
},
|
|
});
|