-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG Transformer Broken #6688
Comments
I wrote that section of the docs without testing it 😶 Something like this should be possible though, one way or another |
Hi Folks. Thanks |
Does anyone have a workaround they can share? |
Don't use a pipeline, this will transform every svg import into a react component:
|
Thanks, I did actually stumble across this later but ended up having to manually convert my svgs to tsx with |
We have SVGs that are referenced by path/filename in BodyMovin animation files. We cant have these be converted to React components but would like to have them be handled by our bundler. |
I used the standard url: to get around this
…On Mon, Sep 20, 2021, 10:59 AlexMoutonNoble ***@***.***> wrote:
We have SVGs that are referenced by path/filename in BodyMovin animation
files. We cant have these be converted to React components but would like
to have them be handled by our bundler.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6688 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFZTGEFMVWD4FCB4QCRUZTUC5Y65ANCNFSM5BUTJ2ZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I also cannot use the transformer on all SVGs and need a way to exclude some. Any update on this or does anyone have a workaround? |
I've just tried using this .parcelrc config, while importing to one of my React components:
Doing this gives me a "@parcel/transformer-js: cannot access a scoped thread local variable without calling |
In the example here:
https://github.com/parcel-bundler/website/blob/v2/src/recipes/react.md
I tried this and it didn't work.
Using:
Results in Error:
.parcelrc
Thanks!
The text was updated successfully, but these errors were encountered: