This is similar to #96 and slightly related to #275
v0.16.0 supports svgr v7.0.0 but only when "type": "module" is set. When this is not set then it fails the build with the svgr is not a function.
When debugging, it looks like the svgrCore object now has another default inside it that means that you have to access transform via svgrCore.default.transform rather than the svgrCore.transform that it's using at the moment.
When I change this in my node_modules that does indeed fix the issue for me but I'm not sure what would be needed to maintain backwards compatibility otherwise I'd raise a PR. Looks like the peerDependency has been updated to >=7.0.0 though.
Describe the bug
This is similar to #96 and slightly related to #275
v0.16.0 supports
svgr
v7.0.0 but only when"type": "module"
is set. When this is not set then it fails the build with thesvgr is not a function
.When debugging, it looks like the
svgrCore
object now has anotherdefault
inside it that means that you have to accesstransform
viasvgrCore.default.transform
rather than thesvgrCore.transform
that it's using at the moment.When I change this in my
node_modules
that does indeed fix the issue for me but I'm not sure what would be needed to maintain backwards compatibility otherwise I'd raise a PR. Looks like thepeerDependency
has been updated to>=7.0.0
though.Reproduction
https://stackblitz.com/edit/unplugin-icons-commonjs-issue?file=package.json
System Info
Used Package Manager
pnpm
Validations