-
Notifications
You must be signed in to change notification settings - Fork 146
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
perf: remove the builtin @rsbuild/plugin-svgr #716
Conversation
✅ Deploy Preview for aquamarine-blini-95325f ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I think the default theme will have svg render problem after executing |
cc @10Derozan |
Can you provide more info for this? |
Debug mode will use source code |
Have you test IconWrapper which you suggested? |
Implemented in #720. It works and allows us to use both string SVG or component SVG at the same time. |
Summary
Remove the built-in SVGR plugin since Rspress does not rely on this plugin.
The SVGR feature is not mentioned in the documentation, but some users who have used custom React components may rely on this behavior, so this could be a potentially breaking change.
Benefits
The benefits of removing the SVGR plugin are obvious, it can significantly reduce the number of dependencies (-80), and it also allows the use of different SVGR syntax or config, so we will remove it in the next minor version of Rspress.
Migration
Users who have SVGR needs can manually use the @rsbuild/plugin-svgr:
pnpm add @rsbuild/plugin-svgr -D
rspress.config.ts
:Checklist
pnpm run change
.