-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
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'increateTanStackRouter() - in
app.config.tssettingserver.presettonode(to be able to just serve it with an existing express app. "node" results in just a handler being generated by nitro) - in
app.config.tssettingserver.baseURLto/hub
However when I do that any assets that are served from the public folder do not get the basepath appended correctly.
Example 1
the favicon-16x16.png fails to load in production but it works when being run with vinxi dev:
export const Route = createRootRouteWithContext<RouterContext>()({
head: () => {
return {
links: [
{
rel: "icon",
type: "image/png",
sizes: "16x16",
href: `favicon-16x16.png`,
},
],
};
},
component: RootComponent,
});Example 2
the image/default-1.webp fails to load in production but it works when being run with vinxi dev:
<img src={`/img/default-1.webp`} />Your Example Website or App
https://github.com/flodaniel/tss-subdirectory-hosting-node
Steps to Reproduce the Bug or Issue
- Use the provided repository to build a minimal TSS app with the props and serve it at the subpath with the express app (also in the repo)
Expected behavior
Setting the basepath as described should serve all assets correctly from the basepath.
Screenshots or Videos
No response
Platform
- OS: any
- Browser: Brave
- Version: 1.114.30
Additional context
Previous discord discussions:
Metadata
Metadata
Assignees
Labels
No labels