3: import IconAlertCircle from '~icons/tabler/alert-circle'
^
4: import IconMessages from '~icons/tabler/messages'
5: import IconDatabase from '~icons/tabler/database'
error during build:
RollupError: "default" is not exported by "~icons/tabler/alert-circle.jsx"
This can be fixed in src/core/compilers/jsx.ts by installing @svgr/plugin-jsx and specifying that in svgr()'s plugins option:
let res = await svgr(
svg,
- {},
+ {
+ plugins: ['@svgr/plugin-jsx'],
+ },
{ componentName: camelize(`${collection}-${icon}`) },
)
A workaround for users is to install @svgr/core@6.
Describe the bug
@svgr/core
v7.0.0 (released 2 days ago) has removed@svgr/plugin-jsx
from its default plugins, which breaks the build ofunplugin-icons
in React projects.Example error:
This can be fixed in src/core/compilers/jsx.ts by installing
@svgr/plugin-jsx
and specifying that insvgr()
'splugins
option:A workaround for users is to install
@svgr/core@6
.Reproduction
https://stackblitz.com/edit/unplugin-icons-bug-with-svgr
System Info
Used Package Manager
npm
Validations