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: Loading svg fragment #3887

Open
1 task done
jschuler opened this issue Mar 8, 2022 · 0 comments
Open
1 task done

🐛 BUG: Loading svg fragment #3887

jschuler opened this issue Mar 8, 2022 · 0 comments

Comments

@jschuler
Copy link

jschuler commented Mar 8, 2022

Quick checklist

  • I am using the latest version of Snowpack and all plugins.

What package manager are you using?

npm

What operating system are you using?

macOS

Describe the bug

I have css that sets background url to an svg fragment, like so:

backgroundUrl:url(assets/images/status-icon-sprite.svg#select);

Looks like having the id/fragment after .svg may not be supported out of the box?

 > build/index.css:2644:15638: error: No loader is configured for ".svg" files: build/assets/images/status-icon-sprite.svg#select

It works after I add the postcss-svg plugin though.

Steps to reproduce

  1. npx create-snowpack-app using template
  2. jsx file that imports css which has a background url set to an svg with a fragment
  3. snowpack build
  4. Error! > build/index.css:2644:15638: error: No loader is configured for ".svg" files: build/assets/images/status-icon-sprite.svg#select
    2644 │ ...kgroundUrl:url(assets/images/status-icon-sprite.svg#select);...
    ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to minimal reproducible example (optional)

No response

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

1 participant