TanStackT
TanStack11mo ago
7 replies
broad-emerald

Not able to configure base path.

I'm trying to serve a TanStack Start app off a base path ie. /tan. Here's what I've tried.

- Setting only basepath: "/tan" in the createTanStackRouter() => all css and js are served off root "/", not "/tan" (screenshot 1)
- Setting both basepath: "/tan" in the createTanStackRouter(), and also vite.base: "/tan" in app.config.ts => css is served off "/tan", js are served off root "/" (screenshot 2)

^ context, I'm deploying the Start app to AWS CloudFront, where root
/
points to a static landing page, and /blog points to the Start app.
Screenshot_2025-03-18_at_5.47.10_PM.png
Screenshot_2025-03-18_at_5.55.14_PM.png
Was this page helpful?