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

[Bug?]: docs: favicon.ico is missing in prod #1235

Open
2 tasks done
glitch-txs opened this issue Jan 9, 2024 · 5 comments
Open
2 tasks done

[Bug?]: docs: favicon.ico is missing in prod #1235

glitch-txs opened this issue Jan 9, 2024 · 5 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@glitch-txs
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

image

Expected behavior 🤔

icon should show in the browser tab

Steps to reproduce 🕹

Steps:

Context 🔦

No response

Your environment 🌎

No response

@glitch-txs glitch-txs added the bug Something isn't working label Jan 9, 2024
@ryansolid
Copy link
Member

It's very odd. I must admit. I see the file in my local builds. I presume it makes it to cloudflare and yet it doesn't get served by the static asset.

@edivados
Copy link
Contributor

This is what I could find out.

kv-asset-handler tries to determine the type of /favicon.ico with mime, fails and loads /favicon.ico/index.html.

The interessting thing is that ico and other extensions which should be there are missing from mime. Why that is I don't know. Tried to force everything to kv-asset-handler: 0.3.0 and mime: 3 but no luck. Maybe something else is messing with it.

var Mime_1 = Mime$1;

var standard = {...}

let Mime = Mime_1;
var lite = new Mime(standard); // <=== where is the others map?

var mime_1 = mime$1.exports;

@ryansolid ryansolid added the documentation Improvements or additions to documentation label Jan 25, 2024
@birkskyum
Copy link
Contributor

Seems to work alright?

Screenshot 2024-03-12 at 15 31 38

@ryansolid
Copy link
Member

I think that is an old saved one. I still see us returning an HTML page on that request. Somehow it isn't there or isn't matching on static assets first.

@edivados
Copy link
Contributor

The answer was right there...🤦‍♂️

This was fixed for the pages preset. There is an open issue for the cloudflare preset and apperently also applies to cloudflare_module.

mime/lite seems to be pulled in by unenv. Adding an alias to the full mime db like it was done for pages works around the problem. Gave it a quick try locally and worked.

server: {
    preset: "cloudflare_module",
    alias: {
      "_mime": "mime/index.js"
    }
}

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

No branches or pull requests

4 participants