You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A defined basepath is not respected correctly in TSS. A basepath in TSS can be set in theory by:
setting basepath: '/hub' in createTanStackRouter()
in app.config.ts setting server.preset to node (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.ts setting server.baseURL to /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:
The text was updated successfully, but these errors were encountered:
flodaniel
changed the title
Serving on basepath (e.g. /tan) does not correctly serve assets
Serving on basepath (e.g. /hub) does not correctly serve assets
Apr 3, 2025
flodaniel
changed the title
Serving on basepath (e.g. /hub) does not correctly serve assets
Serving TSS on basepath (e.g. /hub) does not correctly serve assets
Apr 3, 2025
flodaniel
added a commit
to flodaniel/tss-subdirectory-hosting-node
that referenced
this issue
Apr 3, 2025
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:
basepath: '/hub'
increateTanStackRouter()
app.config.ts
settingserver.preset
tonode
(to be able to just serve it with an existing express app. "node" results in just a handler being generated by nitro)app.config.ts
settingserver.baseURL
to/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
:Example 2
the image/default-1.webp fails to load in production but it works when being run with
vinxi dev
:Your Example Website or App
https://github.com/flodaniel/tss-subdirectory-hosting-node
Steps to Reproduce the Bug or Issue
Expected behavior
Setting the basepath as described should serve all assets correctly from the basepath.
Screenshots or Videos
No response
Platform
Additional context
Previous discord discussions:
The text was updated successfully, but these errors were encountered: