Skip to content

Commit

sudo: ~/ is an explicit alias, not tsconfig paths, so a build beside the other sites always resolves it

syntaqxcommitted Parentf297940Browse files
1 file+5−10/1 viewed
+5−1
11 import { reactRouter } from "@react-router/dev/vite";
22 import { cloudflare } from "@cloudflare/vite-plugin";
33 import tailwindcss from "@tailwindcss/vite";
4+import { fileURLToPath } from "node:url";
45 import { defineConfig } from "vite";
56
67 export default defineConfig({
1011 reactRouter(),
1112 ],
1213 resolve: {
13− tsconfigPaths: true,
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)) },
1418 },
1519 });