Replies: 2 comments
-
Probably a duplicate of #65360. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Non-Goals
N/A
Background
In our app we're currently still using Webpack due to incompatibilities with Turbopack. One of the larger ones is supporting bundling SVGs depending on the
resourceQuery
property in the Webpack loaders. For smaller icons that we need to be able to change color on etc, we bundle withsvgr
, but for larger SVG images we just let the URL loader handle it to avoid increasing the bundle size unnecessarily. The configuration looks like this:So an import ending with
.svg?url
will not be bundled whereas the rest of the.svg
imports will. This helps save bundle size greatly.Proposal
I don't have a strong opinion on how this should be implemented, maybe you want to go the same route as Webpack, or maybe you have something planned for this already. But for someone who is eager to switch to Turbopack, I'm hoping that a stopgap solution would be fine in the meantime.
Beta Was this translation helpful? Give feedback.
All reactions