-
Notifications
You must be signed in to change notification settings - Fork 144
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
fix(plugin-react): allow configuring tools.swc
to override react runtime
#3449
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -46,7 +46,7 @@ export const pluginBasic = (): RsbuildPlugin => ({ | |||
}, | |||
}); | |||
|
|||
const usingHMR = !isProd && config.dev.hmr && target === 'web'; | |||
const usingHMR = isDev && config.dev.hmr && target === 'web'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay to do this change?
I see the snapshots of webpack and svgr are not as same as before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These is also one place of usingHMR
!isProd && environmentConfig.dev.hmr && target === 'web'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is expected, we should only enable HMR when mode
is development
.
Summary
Allow configuring
tools.swc
to override react runtime.Related Links
resolve #3418
Checklist