g1t/apps/sudo/vite.config.ts

19 lines693 bytesCodeBlame
1import { reactRouter } from "@react-router/dev/vite";
2import { cloudflare } from "@cloudflare/vite-plugin";
3import tailwindcss from "@tailwindcss/vite";
4import { fileURLToPath } from "node:url";
5import { defineConfig } from "vite";
6
7export 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});