import { reactRouter } from "@react-router/dev/vite"; import tailwindcss from "@tailwindcss/vite"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ plugins: [tailwindcss(), reactRouter(), tsconfigPaths()], server: { port: 5173, host: true, // allow external access (local dev only) }, optimizeDeps: { // Dev only: scan every app file for libraries at startup. The route list React Router passes matches nothing // here, so libraries were found late, and Vite reloaded the open page mid-action (e.g. after creating a project), // which could leave it stuck on the loading screen. entries: ['app/**/*.{ts,tsx}', '!app/**/*.d.ts', '!app/routes.ts'], }, });