Open shoogstoel opened 3 weeks ago
astro-icon
^1.1.0
Astro v4.8.7 Node v21.7.3 System Linux (x64) Package Manager unknown Output static Adapter none Integrations astro-icon
No response
Trying to build an overview page for the editors, I am reading the icon folders using Astro.glob, like so:
Astro.glob
const icons = await Astro.glob('@assets/**/*.svg');
In the template, I am iterating the list and passing the icons' names to astro-icons Icon component:
Icon
{iconNames.map((icon) => ( <Icon name={icon} /> ))}
This works fine in development mode. However, the build fails, giving this error message: Unable to locate "_astro/address-book.fQue9oP3" icon!
Unable to locate "_astro/address-book.fQue9oP3" icon!
The build works fine if I pass the icon's name in manually.
Not sure if this is a known limitation. I would expect the build to succeed.
https://stackblitz.com/edit/github-erezqu?file=src%2Fpages%2Ficon-test.astro
Same issue...
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
Trying to build an overview page for the editors, I am reading the icon folders using
Astro.glob
, like so:In the template, I am iterating the list and passing the icons' names to
astro-icon
sIcon
component:This works fine in development mode. However, the build fails, giving this error message:
Unable to locate "_astro/address-book.fQue9oP3" icon!
The build works fine if I pass the icon's name in manually.
What's the expected result?
Not sure if this is a known limitation. I would expect the build to succeed.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-erezqu?file=src%2Fpages%2Ficon-test.astro