-
-
Notifications
You must be signed in to change notification settings - Fork 256
SVG TypeError: Cannot read property 'tagName' of null #351
Comments
Can confirm same issue happening here after upgrading file-loader from v4.2.0 to v5.0.2. |
Duplicate of gregberge/svgr#362 |
Why is this issue closed @evilebottnawi? |
@markusdanek do you read changelog? we switch on ES modules so some other non official loaders can buggy, we can't solve this on our side, look in you stack trace in error:
You can see what problem in |
Yes I read the changelog and saw the breaking change with ESModule. |
@markusdanek yes it can affect, potential buggy place https://github.com/smooth-code/svgr/blob/master/packages/webpack/src/index.js#L34 |
@markusdanek you can fix it using |
Faced the same issue, resolved it by adding individual export entries in image directory like below.
Actual IssueIt's been imported as direct svg file as
FixStep 1: Added index.js to
Step 2: Exported as individual file in index.js
Final Step 3: call them as component
|
Expected Behavior
Load SVG icon in JSX.
Actual Behavior
Code
How Do We Reproduce?
After updating
file-loader
from v4.2.0 to v5.0.2 I am getting this error.The text was updated successfully, but these errors were encountered: