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

Consistent handling of base between preloadCode and preloadData #10398

Closed
WaltzingPenguin opened this issue Jul 17, 2023 · 0 comments
Closed
Milestone

Comments

@WaltzingPenguin
Copy link

WaltzingPenguin commented Jul 17, 2023

Describe the problem

When using base in a project, preloadCode works only if I give it a path excluding base. preloadData works only if I give it a path including base. Additionally, preloadData will error if no paths match but preloadCode does not.

With the combination of these issues and no immediate visible impact on the application, it is very easy to have preloadCode calls that are broken and do nothing. Tracking them down inside an application of any size is difficult.

Repo to test: https://github.com/WaltzingPenguin/sveltekit-preload

Describe the proposed solution

preloadCode should require base as part of the path to match preloadData (and goto). preloadCode should also throw an error if it did not match any routes.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

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

No branches or pull requests

2 participants