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
Astro v4.3.5
Node v18.18.0
System Linux (x64)
Package Manager unknown
Output static
Adapter none
Integrations astro-icon
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Upgraded a project from Astro 3.1.0 to 4.3.5 and astro-icon 0.8.0 to 1.1.0.
When I run astro build I get several errors with this pattern:
# astro build
Failed to import "filename": Unexpected element: <image>
When I run astro dev I get similar errors:
# astro dev
Unable to locate "filename" icon!
The respective files are SVG files that contain at least one <image> element. These image elements contain PNG data encoded as base64 which is totally valid SVG and was working fine before the upgrade.
It seems like it doesn't matter if and how the SVG files are imported. Their pure existence causes the error when astro-icon is installed.
What's the expected result?
Build should run without errors when having SVG files with <image> elements in the src directory. Respective SVG files should be importable and usable as an image src, and should be found by the <Icon> component.
It appears so. This unfortunately is something we won't be able to fix in the current iteration. I believe the new experimental SVG inlining will handle this.
For now, SVGs with an image tag should manually wrap rather than using this library.
What version of
astro-icon
are you using?1.1.0
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Upgraded a project from Astro 3.1.0 to 4.3.5 and astro-icon 0.8.0 to 1.1.0.
When I run
astro build
I get several errors with this pattern:When I run
astro dev
I get similar errors:The respective files are SVG files that contain at least one
<image>
element. These image elements contain PNG data encoded as base64 which is totally valid SVG and was working fine before the upgrade.It seems like it doesn't matter if and how the SVG files are imported. Their pure existence causes the error when astro-icon is installed.
What's the expected result?
Build should run without errors when having SVG files with
<image>
elements in thesrc
directory. Respective SVG files should be importable and usable as an image src, and should be found by the<Icon>
component.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-ev9r7b?file=package.json
The text was updated successfully, but these errors were encountered: