-
-
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
Favicon.ico Not Found #3525
Comments
|
Not sure if that line is needed. The workaround: diff --git a/packages/kit/src/core/dev/plugin.js b/packages/kit/src/core/dev/plugin.js
index f8116132..90ec560c 100644
--- a/packages/kit/src/core/dev/plugin.js
+++ b/packages/kit/src/core/dev/plugin.js
@@ -141,7 +141,7 @@ export async function create_plugin(config, cwd) {
vite.middlewares.use(async (req, res) => {
try {
if (!req.url || !req.method) throw new Error('Incomplete request');
- if (req.url === '/favicon.ico') return not_found(res);
+ //if (req.url === '/favicon.ico') return not_found(res);
const base = `${vite.config.server.https ? 'https' : 'http'}://${req.headers.host}`; |
Commit that added it. Looks like a refactor though, so might have been introduced earlier. |
|
It seems like this line has always been there ... I checked the git logs all the way back to march of last year. I can't think of a good reason of why this line is needed. I don't see why SvelteKit should not support .ico files for the favicon as they are broadly used. Also the current behaviour is inconsistent as 404 is only returned in dev mode. I'll remove it and create a PR. |
Describe the bug
Starting version 231 svelte-kit is no longer able to display static asset favicon.ico. I have previously described the issue here: #3393 (comment):
Reproduction
https://github.com/lemmon/svelte-kit-favicon-issue
Try to load http://localhost:3000/favicon.ico -> 404 Not Found
Logs
No response
System Info
System: OS: macOS 11.5.2 CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz Memory: 407.90 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.1 - /usr/local/bin/node npm: 8.3.1 - /usr/local/bin/npm Browsers: Brave Browser: 88.1.19.86 Chrome: 97.0.4692.99 Firefox: 96.0.1 Safari: 15.0 npmPackages: @sveltejs/adapter-auto: next => 1.0.0-next.14 @sveltejs/kit: next => 1.0.0-next.240 svelte: ^3.44.0 => 3.46.2Severity
annoyance
Additional Information
No response