Files
mechanic-pwa/mechanic-pwa/frontend/vite.config.ts
T
tremble7681andclaude-flow e815955d46 feat(mechanic-pwa): scaffold Vite+React+TS+Tailwind+shadcn+PWA+routing (Phase G G1-G5)
- Vite 8 + React 19 + TypeScript 6 project via create-vite react-ts template
- Tailwind v3.4 with shadcn-compatible cream palette (CSS vars)
- vite-plugin-pwa v1.3 with autoUpdate SW, manifest.webmanifest, 192+512 icons
- shadcn/ui components written manually (default style): button, card, input, label, sonner
- Zustand persist auth store, ky API client with Bearer token hooks
- React Router v7 routing with RequireAuth guard
- TanStack Query v5 + Toaster wired in main.tsx
- 5 stub pages: Login, Home, VehicleCard, InspectionEditor, InspectionReview
- Build: 293 KB JS / 9.4 KB CSS, clean zero-warning tsc+vite build

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-17 10:39:27 +10:00

34 lines
767 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { VitePWA } from "vite-plugin-pwa";
import path from "node:path";
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
includeAssets: ["icons/*.png"],
manifest: false, // we ship our own at public/manifest.webmanifest
workbox: {
globPatterns: ["**/*.{js,css,html,svg,png,woff2}"],
runtimeCaching: [
{
urlPattern: /\/api\//,
handler: "NetworkOnly",
},
],
},
}),
],
resolve: {
alias: { "@": path.resolve(__dirname, "src") },
},
server: {
port: 5173,
proxy: {
"/api": "http://localhost:8000",
},
},
});