import path from "node:path"; import babel from "@rolldown/plugin-babel"; import { appShellRoutes } from "@tailor-platform/app-shell/vite-plugin"; import tailwindcss from "@tailwindcss/vite"; import react, { reactCompilerPreset } from "@vitejs/plugin-react"; import { defineConfig } from "vite"; // https://vite.dev/config/ export default defineConfig({ plugins: [ react(), babel({ presets: [reactCompilerPreset()], }), tailwindcss(), // app-shell routing plugin (legacy interception mode). // generateTypedRoutes is intentionally OFF: app-shell's createTypedPaths // >> rejects the plugin's // generated closed-object route type (TS2344) — reproduced on app-shell // 1.3.0 AND 1.4.1 (same generator, app-shell-vite-plugin 0.2.2, the latest). // Re-enable when the generator ships a fix (>0.2.2) — NOT on an app-shell // version bump (the bump doesn't fix it). See the app-shell board ticket. appShellRoutes(), ], resolve: { alias: { "@": path.resolve(import.meta.dirname, "./src"), }, }, });