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

adapter-static data:image URL error 404 #2645

Closed
leighwilliams opened this issue Oct 20, 2021 · 1 comment · Fixed by #3288
Closed

adapter-static data:image URL error 404 #2645

leighwilliams opened this issue Oct 20, 2021 · 1 comment · Fixed by #3288
Labels
bug Something isn't working pkg:adapter-static
Milestone

Comments

@leighwilliams
Copy link

Describe the bug

Hi,

I'm trying to use an emoji favicon as described here: https://css-tricks.com/emojis-as-favicons/

<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>💥</text></svg>">

When building this with adapter-static it fails to handle the data:image/svg URL:

Error: 404 /%22data:image/svg+xml,%3Csvg (linked from /)

Reproduction

https://github.com/leighwilliams/svelte-kit-repro

  1. npm run build

Logs

...
> Using @sveltejs/adapter-static
> 404 /%22data:image/svg+xml,%3Csvg (linked from /)
Error: 404 /%22data:image/svg+xml,%3Csvg (linked from /)
    at file:///project/node_modules/@sveltejs/kit/dist/chunks/index4.js:86:11
    at visit (file:///project/node_modules/@sveltejs/kit/dist/chunks/index4.js:213:5)
    at async visit (file:///project/node_modules/@sveltejs/kit/dist/chunks/index4.js:281:6)
    at async prerender (file:///project/node_modules/@sveltejs/kit/dist/chunks/index4.js:291:6)
    at async Object.prerender (file:///project/node_modules/@sveltejs/kit/dist/chunks/index4.js:353:4)
    at async adapt (file:///project/node_modules/@sveltejs/adapter-static/index.js:13:4)
    at async adapt (file:///project/node_modules/@sveltejs/kit/dist/chunks/index4.js:378:2)
    at async file:///project/node_modules/@sveltejs/kit/dist/cli.js:878:5
npm ERR! code ELIFECYCLE
npm ERR! errno 1
...

System Info

System:
    OS: macOS 11.4
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    Memory: 142.95 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.0 - ~/.volta/tools/image/node/14.17.0/6.14.13/bin/node
    Yarn: 1.22.0 - ~/.volta/tools/image/yarn/1.22.0/bin/yarn
    npm: 6.14.13 - ~/.volta/tools/image/node/14.17.0/6.14.13/bin/npm
  Browsers:
    Brave Browser: 93.1.29.79
    Chrome: 94.0.4606.81
    Firefox: 93.0
    Safari: 14.1.1
  npmPackages:
    @sveltejs/adapter-static: ^1.0.0-next.21 => 1.0.0-next.21
    @sveltejs/kit: next => 1.0.0-next.184
    svelte: ^3.34.0 => 3.43.2

Severity

annoyance

Additional Information

No response

@Conduitry Conduitry added bug Something isn't working pkg:adapter-static labels Oct 20, 2021
@benmccann benmccann added this to the 1.0 milestone Oct 20, 2021
@gg187on
Copy link

gg187on commented Oct 21, 2021

hello, I would like to work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:adapter-static
Projects
None yet
4 participants