However, when I run I get thrown the following error
Internal server error: Icon `mono/test` not found`
which in the node_modules\unplugin-icons\dist files come from
// some chunk.js file
const svg = await _nodeloader.loadNodeIcon.call(void 0, collection, icon, iconifyLoaderOptions);
if (!svg)
throw new Error(`Icon \`${warn}\` not found`);
I'm not sure what really is happening, but I found FileSystemIconLoader and doing a console.log(name) in the return async ..., I discovered that the function gets called twice and on the second call, it gets an undefined (on the first call, it gets test correctly.
Describe the bug
I tried to follow the guides as close as possible. I have a
test.svg
file in./collections/mono
and have configured ad.ts
file as well (following example https://github.com/antfu/unplugin-icons/tree/main/examples/vite-react closely)The following is my config file and how I load the icon
However, when I run I get thrown the following error
which in the
node_modules\unplugin-icons\dist
files come fromI'm not sure what really is happening, but I found
FileSystemIconLoader
and doing aconsole.log(name)
in thereturn async ...
, I discovered that the function gets called twice and on the second call, it gets anundefined
(on the first call, it getstest
correctly.Reproduction
see above, note again using v.0.16.1 and had to install
@svgr/plugin-jsx
along with@svgr/core
System Info
Used Package Manager
yarn
Validations