| 1 | import { reactRouter } from "@react-router/dev/vite"; |
| 2 | import { cloudflare } from "@cloudflare/vite-plugin"; |
| 3 | import tailwindcss from "@tailwindcss/vite"; |
| 4 | import { fileURLToPath } from "node:url"; |
| 5 | import { defineConfig } from "vite"; |
| 6 | |
| 7 | export default defineConfig({ |
| 8 | plugins: [ |
| 9 | cloudflare({ viteEnvironment: { name: "ssr" } }), |
| 10 | tailwindcss(), |
| 11 | reactRouter(), |
| 12 | ], |
| 13 | resolve: { |
| 14 | // `~/` is app/, set here rather than read from tsconfig's paths: those |
| 15 | // apply only to files tsconfig includes, and a build beside the other |
| 16 | // sites' (deploy.mjs) sometimes found legacy-accounts.tsx outside them. |
| 17 | alias: { "~": fileURLToPath(new URL("./app", import.meta.url)) }, |
| 18 | }, |
| 19 | }); |