-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
paths.base
production build routing issue
#8091
Comments
paths.base
production build routing issue
|
I did upgrade from:
to
I do not see how I could deliver a reproducible as it all depends on the proxy being in place and rewriting URLs,...? |
Wow that's ... a big jump 😅 Could you check what happens if you're pinning the version to Re "how": You could provide a GitHub repository with all the necessary things wired up. For the proxy, a thorough explanation how to set it up (maybe there's a way to use a simpler proxy that can also be included in the GitHub repo and setup correctly). |
@dummdidumm Yes, it is quite a jump :-) Well, I will try and put something together, that might take some time though. I have just tried a fresh project and played around with the static adapter,...and I think I have seen some weird routing behavior as well (at least from what I am used to). I will be back with a repo and more detailed information,... |
@dummdidumm There are two branches, All in all, it seems that the behavior changed from the older version to the newer. With the newer, I would have to turn off the path-rewriting in the proxy. |
@dummdidumm Yes, that seems to be the case :-) Absolutely agree with that. |
Describe the problem
Hi all
I serve a Svelte application through a reverse proxy under a sub-path like
http://my-site.com/sub/path
. When forwarding the requests, the reverse proxy rewrites the path so that/sub/path
gets removed, resulting in requets to the Svelte deployment as if it were hosted at the root.To make this work, I set
paths.base
to/sub/path
. Using thenode
adapter, it prepended thatpaths.base
to every static asset URL so that it was correctly fetched.After upgrading to the most recent version of
@sveltejs/kit
and@adapter/node
things do not seem to work anymore. When setting thepaths.base
variable, it seems that the resultingnode
build expects me to hit the server with the routes${paths.base}/actual-route
. Which is not really how it used to work,...Describe the proposed solution
Fix routing based on
paths.base
...Alternatives considered
No response
Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: