We've made the changes needed to get SVG support working in our own monorepo.
They're available on npm at @alectalisman/[email protected].
But maintenance of this fork will fall to us unless we can get something pushed upstream.
Preconstruct's design goals include completely abstracting away the rollup configuration, so we can expect its maintainers will reject a PR which attempts to simply expose that config to users.
I'm hoping we might be able to find a compromise between no support for svg imports and fully exposed rollup configuration.
My plan is to integrate svgr as a separate feature of preconstruct.
The feature will expose a limited number of configuration options as children on the preconstruct package.json config.
Limited because we want to be sure that future @svgr/rollup changes don't create breaking changes for preconstruct users unless absolutely necessary.
Todos
Convert svgr integration from a hardcoded fork into an optional, configurable feature
Add tests to check that the feature works as intended (and that preconstruct throws helpful errors when it's switched off)