You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
The SVG data uri minifier we have didn't quite anticipated single quotes within attribute values. We currently transform all double quotes as single quotes. Maybe the fix is to detect "...'..." an pre-escape them.
Describe the bug
background-image: url('./someFile.svg');
inside asomeFile.module.scss
The bug happens when an svg attribute contains an apostrophe
'
. in my case i had a<g data-name="some d'ata name"></g>
Reproduction
https://stackblitz.com/edit/vitejs-vite-ifrcfk?file=javascript.svg
Steps to reproduce
You wont see the issue on the reproduction url since it's "dev time" and not after build
Build any project with an svg containing
data-name="some d'ata name"
Then with
vite preview
for instance, you can see the svg is not rendered and contains an errorBuilt svg has this => data-name='some d'ata name' (apostrophe is not escaped)
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: