Skip to content
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

SvelteKit: Document relative paths configuration #640

Merged

Conversation

treo
Copy link
Contributor

@treo treo commented Feb 17, 2024

I ran into a weird behavior while developing a SvelteKit frontend with Quinoa

Whenever a full reload happend an a nested route, it would give me a 404 error. But if I followed a link to that same route it worked just fine.

Then I tried it without Quinoa proxying the request, and there the full reload also worked perfectly fine.

It turns out that SvelteKit will assume that its base directory is whatever the current path's parent directory is if the request is proxied to it the way that Quiona does it.

By configuring it to not assume that it should be using relative paths by default, the problem was resolved.

Describe your changes

Document how to configure SvelteKit to use absolute paths in its routing.

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Tell SvelteKit that it should not automatically assume that it may be running in a sub-directory.
@melloware melloware added the documentation Improvements or additions to documentation label Feb 17, 2024
@melloware melloware merged commit 4e66971 into quarkiverse:main Feb 17, 2024
2 checks passed
@melloware
Copy link
Contributor

Thank you for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants