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
First off, thanks for making this! Please let me know if this should go to the SVGR repo, because it's definitely possible.
I'm using Preact and my config in vite.config.ts (sorry, private repo) looks like this:
svgr({exportAsDefault: true,svgrOptions: {// Types are out of sync with package & docs// https://react-svgr.com/docs/options/#jsx-runtime-import-source// @ts-ignorejsxRuntimeImport: {importSource: 'preact',specifiers: ['h'],},},}),
Note: I originally used jsxRuntime: 'classic-preact', but for one reason or another (it's been a bit) it didn't work, so that's how I ended up here. As you can see there seem to be some mismatches between docs and the types, at least—maybe the logic, too.
Passing class rather than className, as is the standard in Preact, means the value is effectively ignored. It's a small thing and I can just use className here, but I thought it was worth pointing out.
First off, thanks for making this! Please let me know if this should go to the SVGR repo, because it's definitely possible.
I'm using Preact and my config in
vite.config.ts
(sorry, private repo) looks like this:Note: I originally used
jsxRuntime: 'classic-preact',
but for one reason or another (it's been a bit) it didn't work, so that's how I ended up here. As you can see there seem to be some mismatches between docs and the types, at least—maybe the logic, too.Passing
class
rather thanclassName
, as is the standard in Preact, means the value is effectively ignored. It's a small thing and I can just useclassName
here, but I thought it was worth pointing out.Expectation
Given
foo.svg
:The following code in Preact:
Should render:
But it renders:
The below produces the expected result:
The text was updated successfully, but these errors were encountered: