Set up Vite + React 19 + TypeScript, Tauri v2, Tailwind v4, shadcn/ui (dark theme), and all core frontend dependencies (Zustand, TanStack Query/Table/Virtual, CodeMirror, lucide-react). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
621 B
TypeScript
32 lines
621 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import path from "path";
|
|
|
|
const host = process.env.TAURI_DEV_HOST;
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
clearScreen: false,
|
|
server: {
|
|
port: 5173,
|
|
strictPort: true,
|
|
host: host || false,
|
|
hmr: host
|
|
? {
|
|
protocol: "ws",
|
|
host,
|
|
port: 1421,
|
|
}
|
|
: undefined,
|
|
watch: {
|
|
ignored: ["**/src-tauri/**"],
|
|
},
|
|
},
|
|
});
|