import { paraglideVitePlugin } from "@inlang/paraglide-js"; import tailwindcss from "@tailwindcss/vite"; import { devtools } from "@tanstack/devtools-vite"; import { tanstackStart } from "@tanstack/react-start/plugin/vite"; import viteReact from "@vitejs/plugin-react"; import { nitro } from "nitro/vite"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; const APP_BASE_PATH = "/app"; const config = defineConfig(({ command }) => ({ base: command === "build" ? `${APP_BASE_PATH}/` : "/", plugins: [ nitro(), devtools(), paraglideVitePlugin({ project: "./project.inlang", outdir: "./src/paraglide", strategy: ["url", "baseLocale"], }), tsconfigPaths({ projects: ["./tsconfig.json"] }), tailwindcss(), tanstackStart({ spa: { enabled: true, }, }), viteReact({ babel: { plugins: ["babel-plugin-react-compiler"], }, }), ], })); export default config;