-
-
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
Links to static assets do not work #1492
Comments
You probably need to set |
SvelteKit knows which static assets it has, so there is no reason that we can't make it work with a normal link, is there ? |
I assume this is fixed by #1487 |
This sounds like a duplicate of #1295 |
Yes, it is a duplicate. But let me just point out that this isn't solved by the patch (not)tobi mentions - that solves the case if you have app base |
Oh, yes, I did not find that original issue. Sorry. |
Describe the bug
When creating a link to a static asset, clicking the link triggers a 404 instead of opening the asset.
Logs
The issue doesn't log anything.
To Reproduce
In the default sveltekit app:
static/hello.txt
with the contentshello world
src/index.svelte
, add the following link:<a href="/hello.txt">xxx</a>
run
npm run dev
, then, from your browser, click the linkExpected behavior
The text file is loaded
Actual behavior
A 404 error
Information about your SvelteKit Installation:
Diagnostics
Severity
Caused a broken link in production for me in
https://sanipasse.fr/french-health-pass
The text was updated successfully, but these errors were encountered: