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

Multi-line SVG is not exported correctly #21

Closed
Frank3K opened this issue Apr 24, 2022 · 1 comment
Closed

Multi-line SVG is not exported correctly #21

Frank3K opened this issue Apr 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Frank3K
Copy link

Frank3K commented Apr 24, 2022

The exported SVG is exported using single quotes, but this generates invalid JavaScript code when the SVG file contains more than a single line. Backticks could be used instead, or newlines can be stripped.

return {code: `export default '${SvgProcessor.process(code, {...options, fileName: id})}'`, map: {mappings: ''}};

@sionzee sionzee added the bug Something isn't working label Apr 24, 2022
@sionzee sionzee self-assigned this Apr 24, 2022
@sionzee
Copy link
Owner

sionzee commented Apr 24, 2022

Hi, backticks would break compatibility with the IE11. #4

Stripping the new lines makes sense, and I would go for that option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants