This PR delays deprecation of `svgr` for `@nx/next`, as Turbopack
supports it now.
This PR also deprecates all SVGR support for v22. It is not a well-used
feature, and the webpack plugin is not maintained. We'll ensure in v22
to add the SVGR webpack plugin to userland configs, but we'll not
maintain it ourselves moving forward.
<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->
## Current Behavior
<!-- This is the behavior we have today -->
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
Fixes #
This PR adds the ability to now override our svg options by providing
them either using `NxReactWebpackPlugin` for react apps or `withNx` for
Next.js apps
```
new NxReactWebpackPlugin({
svgr: {
svgo: true,
titleProp: true,
ref: true,
}
}),
```
This now gives you control on customizing how the svg is handled. Should you need to enable svgo you can provide the config using `svgr.config.js`
https://react-svgr.com/docs/options/#svgocloses: #9487