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

plugin doesn't inject sprite with Vite 5.2 #23

Closed
dlohvinov opened this issue Apr 15, 2024 · 2 comments
Closed

plugin doesn't inject sprite with Vite 5.2 #23

dlohvinov opened this issue Apr 15, 2024 · 2 comments

Comments

@dlohvinov
Copy link

Hi!

I'm having an issue using VitePluginSvgSprite with latest (5.2) Vite version. When I run vite (local dev mode) - everything works fine, but when I'm running vite build && vite preview - plugin does not inject icon sprite to index.html

Reproduction link:
https://codesandbox.io/p/devbox/svg-sprite-with-vite-5-2-8z85wr

For now, I've downgraded to vite 5.1 :(

@ridgehkr
Copy link

Can confirm that this is broken as of 5.2.0-beta.0. Imported SVGs are not included in the build. I'm not certain, but I suspect it's due to them being considered "unused" by the built-in asset plugin and pruned from the build output. If that's the case, I believe this PR may be the culprit.

@meowtec
Copy link
Owner

meowtec commented Apr 28, 2024

Please try v0.5.2

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

3 participants