Open ForeverYoung1208 opened 1 year ago
As a solution, i felt back to version "@svgr/webpack": "5.4.0" , it works fine. Maybe, later versions also can work, i'll try in future... But for my current puropses as a temporary solution i will use this. Upd: problem file was added here https://github.com/gregberge/svgr/pull/611/files so i think any version 5.x.x should be good.
🐛 Bug Report
When use @svgr/webpack loader with Storybook 6.5.16 got the error on build
which is caused at
https://github.com/gregberge/svgr/blob/82928f02e4a2ae1160e54884461f9edde4ad2293/packages/webpack/src/index.ts#LL65C29-L65C29
which is more likely caused by absence of relevant loader context at the webpack version which Storybook 6.5.16 uses.
To Reproduce
Use any svgr imported component in the Storybook 6.5.16 and try to build Storybook.
Expected behavior
Component is imported and shows imported svg
Run
npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard
Paste the results here: