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

%svelte.assets% not being substituted correctly #3582

Closed
deklanw opened this issue Jan 28, 2022 · 3 comments
Closed

%svelte.assets% not being substituted correctly #3582

deklanw opened this issue Jan 28, 2022 · 3 comments

Comments

@deklanw
Copy link

deklanw commented Jan 28, 2022

Describe the bug

Noticed my favicon was 404ing. On my /about/ route it was requesting /about/favicon.png on a blogpost like /blog/post1 it was requesting /blog/favicon.png.

Reproduction

Navigate to https://kit-demo.netlify.app/about/ and observe that the favicon is missing. The request is 502ing

Logs

No response

System Info

n/a

Severity

annoyance

Additional Information

Probably related to recent changes #3234

@Rich-Harris
Copy link
Member

If your platform is adding trailing slashes to URLs, then you'll need to set trailingSlash: 'always' in your svelte.config.js

@deklanw
Copy link
Author

deklanw commented Jan 28, 2022

@Rich-Harris thanks, that solved it. I was baited by the demo into thinking it wasn't just me being an idiot. Since you're using Netlify to host the demo for testing, maybe it should have that setting on?

@nltesown
Copy link

nltesown commented Feb 10, 2022

For a site built with adapter-static and hosted on GitHub Pages, setting trailingSlash: 'always' solves the problem. Thanks, Rich.

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

No branches or pull requests

3 participants