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
The solution was to also set the base property in the vite config. I'll leave the issue open until this is documented.
Which project does this relate to?
Start
Describe the bug
When setting a basepath, every single resource needs to be prefixed with that basepath, or the app will break when put behind a proxy that only routes requests to that basepath to the app.
We have a very prod-like setup for local dev, so we need basepath handling to work fully for the dev server, or it breaks, since we only route requests to /app over to our dashboard application.
Here are my findings of things that break so far when setting basepath to /app:
Without creating a client entry point, /~start/default-client-entry is requested
If I create a client entry point, all the imports from client.tsx are requested without the basepath.
Another thing that is a bit weird with basepath handling is that if I create routes/api.hello.tsx as a serverFileRoute, it does not get the basepath applied. So all serverFileRoutes have to be put in a folder with the basepath name, while the regular page routes have the basepath applied automatically.
Note
The solution was to also set the
baseproperty in the vite config. I'll leave the issue open until this is documented.Which project does this relate to?
Start
Describe the bug
When setting a basepath, every single resource needs to be prefixed with that basepath, or the app will break when put behind a proxy that only routes requests to that basepath to the app.
We have a very prod-like setup for local dev, so we need basepath handling to work fully for the dev server, or it breaks, since we only route requests to
/appover to our dashboard application.Here are my findings of things that break so far when setting basepath to
/app:/~start/default-client-entryis requested/@vite/client/node_modules/.vite/deps/solid-js_web.js?v=e4a53580/@fs/Users/jakst/project/node_modules/.pnpm/@tanstack+solid-start@1.130.15_solid-js@1.9.7_vite-plugin-solid@2.11.8_solid-js@1.9.7_v_2de64603fd083e50c9f52c16fb1b9292/node_modules/@tanstack/solid-start/dist/esm/client.js?v=e4a53580/src/router.tsxAnother thing that is a bit weird with basepath handling is that if I create
routes/api.hello.tsxas a serverFileRoute, it does not get the basepath applied. So all serverFileRoutes have to be put in a folder with the basepath name, while the regular page routes have the basepath applied automatically.Your Example Website or App
https://codesandbox.io/p/devbox/jovial-dawn-63xwyj
Steps to Reproduce the Bug or Issue
I couldn't get the codesandbox working, but it's fairly straight forward:
basepath: '/app'to the options inrouter.tsx/~start/default-client-entryis requested without the basepath/appExpected behavior
I expect all files requested from the dev server to be prefixed with
/app.Screenshots or Videos
No response
Platform
Additional context
No response