Files
impstr/vite.config.ts
Felix Förtsch f867934295 refactor impstr to react/vite stack, update deploy target
migrate from vanilla TypeScript + Bun bundler to React 19, Vite, TanStack Router,
Zustand, shadcn-style components, Tailwind v4, vite-plugin-pwa.

game logic moves into a Zustand store, UI into React feature components with
file-based routing. all 27 tests pass, biome lint clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:02:11 +01:00

57 lines
1.2 KiB
TypeScript

import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import tailwindcss from "@tailwindcss/vite";
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa";
const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig({
base: "/impstr/",
plugins: [
TanStackRouterVite(),
react(),
tailwindcss(),
VitePWA({
registerType: "prompt",
manifest: {
name: "Imposter",
short_name: "Imposter",
start_url: "/impstr/",
display: "standalone",
background_color: "#f8f3e7",
theme_color: "#f8f3e7",
icons: [
{
src: "icon-192.png",
sizes: "192x192",
type: "image/png",
purpose: "any",
},
{
src: "icon-512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
],
},
workbox: {
globPatterns: ["**/*.{js,css,html,png,svg,woff2}"],
},
}),
],
resolve: {
alias: {
"@": resolve(__dirname, "src"),
},
},
test: {
environment: "jsdom",
globals: true,
setupFiles: ["src/test-setup.ts"],
},
});