JEISA-WEBAPP/vite.config.ts

51 lines
1.4 KiB
TypeScript
Raw Normal View History

2025-09-08 22:12:47 +00:00
import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa";
2025-09-08 22:12:47 +00:00
import dyadComponentTagger from "@dyad-sh/react-vite-component-tagger";
import react from "@vitejs/plugin-react-swc";
import path from "path";
export default defineConfig(() => ({
server: {
host: "::",
port: 8080,
},
plugins: [
dyadComponentTagger(),
react(),
VitePWA({
registerType: "autoUpdate",
includeAssets: [
"favicon.ico",
"favicon-16x16.png",
"favicon-32x32.png",
"apple-touch-icon-180x180.png",
"robots.txt"
],
manifest: {
name: "JEI Stock App",
short_name: "JEI Stock",
description: "Stock management PWA for JEISA",
theme_color: "#0f172a",
background_color: "#ffffff",
display: "standalone",
scope: "/",
start_url: "/",
icons: [
{ src: "/icons/icon-192x192.png", sizes: "192x192", type: "image/png", purpose: "any" },
{ src: "/icons/icon-512x512.png", sizes: "512x512", type: "image/png", purpose: "any" },
{ src: "/icons/maskable-512x512.png", sizes: "512x512", type: "image/png", purpose: "maskable" }
],
},
workbox: {
navigateFallback: "/index.html",
cleanupOutdatedCaches: true,
},
}),
],
2025-09-08 22:12:47 +00:00
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
}));