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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 BUG: Lib import with CSS doesn't work in production #2868

Closed
GiovaneRobertiTafine opened this issue Mar 23, 2022 · 3 comments
Closed

Comments

@GiovaneRobertiTafine
Copy link

What version of astro are you using?

^0.24.3

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the Bug

I'm using a library, which exports in css, flags in svg.
Lib: "flag-icons": "^6.1.1"

I'm getting these errors in the browser console when I build it and put it on hosting:

GET https://site-vallorx-astro.netlify.app/assets/__VITE_ASSET__fc872e71__ 404

But when I'm in the environment I'm in the development environment, with the command: astro dev everything works normally.
I place the element in the HTML as informed in the Lib DOC:

<span class="fi fi-br"></span>

And I import Lib like importing any css and it works normally in Dev:

---
    import 'flag-icons/css/flag-icons.css';
---

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-7uvf9a-dwn4w9?file=src%2Fpages%2Findex.astro&on=stackblitz

@github-actions github-actions bot added this to Needs Triage in 馃悰 Bug Tracker Mar 23, 2022
@GiovaneRobertiTafine GiovaneRobertiTafine changed the title 馃悰 BUG: 馃悰 BUG: Lib import with CSS doesn't work in production Mar 23, 2022
@GiovaneRobertiTafine
Copy link
Author

Any answer on this?

@davide93
Copy link

davide93 commented Apr 7, 2022

#2146

@GiovaneRobertiTafine
Copy link
Author

Thanks.

馃悰 Bug Tracker automation moved this from Needs Triage to Done Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants