47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
|
|
/// <reference types="vitest/config" />
|
||
|
|
import { defineConfig } from "vite";
|
||
|
|
import react from "@vitejs/plugin-react";
|
||
|
|
import { VitePWA } from "vite-plugin-pwa";
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [
|
||
|
|
react(),
|
||
|
|
VitePWA({
|
||
|
|
registerType: "autoUpdate",
|
||
|
|
manifest: {
|
||
|
|
name: "Buying Agent",
|
||
|
|
short_name: "BuyingAgent",
|
||
|
|
start_url: "/",
|
||
|
|
display: "standalone",
|
||
|
|
background_color: "#111318",
|
||
|
|
theme_color: "#111318",
|
||
|
|
icons: [
|
||
|
|
{ src: "/icon.svg", sizes: "any", type: "image/svg+xml", purpose: "any" },
|
||
|
|
],
|
||
|
|
},
|
||
|
|
workbox: {
|
||
|
|
navigateFallback: "/offline.html",
|
||
|
|
runtimeCaching: [
|
||
|
|
{
|
||
|
|
urlPattern: ({ request }) => request.mode === "navigate",
|
||
|
|
handler: "NetworkFirst",
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
}),
|
||
|
|
],
|
||
|
|
server: {
|
||
|
|
port: 5173,
|
||
|
|
proxy: {
|
||
|
|
"/api": "http://127.0.0.1:8000",
|
||
|
|
"/health": "http://127.0.0.1:8000",
|
||
|
|
},
|
||
|
|
},
|
||
|
|
test: {
|
||
|
|
environment: "jsdom",
|
||
|
|
globals: true,
|
||
|
|
setupFiles: "./src/test-setup.ts",
|
||
|
|
exclude: ["e2e/**", "node_modules/**"],
|
||
|
|
},
|
||
|
|
});
|