Trouble using ?react query(resourceQuery) with SVGR in Turbopack (Next.js 15.5.0) #83030
Unanswered
GlebKodrik
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I’m trying to configure Turbopack in Next.js to handle SVG files properly, but I can’t get it to work with ?react.
Additional information:
Here’s what I have right now:
But this doesn’t seem to work at all.
If I do it like this:
…it works, but then all SVGs are transformed into React components, and I don’t want that.
My use case:
Also, when using ::before or ::after with SVGs, the content breaks because I can’t explicitly use ?react for the images that need to be React components.
I’ve already tried multiple approaches but couldn’t figure it out.
Has anyone managed to get conditional SVG handling (.svg vs .svg?react) working in Turbopack?
Honestly, it’s been a while and I still can’t believe there’s no solution to this problem.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions