T
TanStack6mo ago
sensitive-blue

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.
No description
No description
7 Replies
sensitive-blue
sensitive-blueOP6mo ago
The tests was done by running vinxi start locally
sensitive-blue
sensitive-blueOP6mo ago
ah yup.. seems to be the same issue
absent-sapphire
absent-sapphire6mo ago
I think we don't have a GitHub issue for this yet. can you please create one including a complete minimal example repo?
sensitive-blue
sensitive-blueOP6mo ago
will do
adverse-sapphire
adverse-sapphire6mo ago
@Frank did you create one? I am still stuck around this issue to find a good config mix that work, if there even is one.
adverse-sapphire
adverse-sapphire6mo ago
FYI i created one here: https://github.com/TanStack/router/issues/3925 Creating a PR for this seems really complicated. I am not even sure if this is a problem with TSR or nitro right now.
GitHub
Serving TSS on basepath (e.g. /hub) does not correctly serve assets...
Which project does this relate to? Start Describe the bug A defined basepath is not respected correctly in TSS. A basepath in TSS can be set in theory by: setting basepath: '/hub' in create...

Did you find this page helpful?