sudo: ~/ is an explicit alias, not tsconfig paths, so a build beside the other sites always resolves it
1 file+5−10/1 viewed
| 1 | 1 | import { reactRouter } from "@react-router/dev/vite"; | |
| 2 | 2 | import { cloudflare } from "@cloudflare/vite-plugin"; | |
| 3 | 3 | import tailwindcss from "@tailwindcss/vite"; | |
| 4 | + | import { fileURLToPath } from "node:url"; | |
| 4 | 5 | import { defineConfig } from "vite"; | |
| 5 | 6 | ||
| 6 | 7 | export default defineConfig({ | |
| 10 | 11 | reactRouter(), | |
| 11 | 12 | ], | |
| 12 | 13 | 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)) }, | |
| 14 | 18 | }, | |
| 15 | 19 | }); |