fix(rsbuild-plugin): add source.include in prod mode only#3971
Conversation
🦋 Changeset detectedLatest commit: 8465470 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| config.source.include = [ | ||
| ...(config.source.include || []), | ||
| /@module-federation[\\/]/, | ||
| /@module-federation\/webpack-bundler-runtime/, |
There was a problem hiding this comment.
Do we want to preserve the transformations of swc itself, but not hot reload / react refresh related aspects?
Like what if we ship modern syntax like optional chaining and want it to obey user specified transformations?
There was a problem hiding this comment.
Yes, this is ideally behavior. But i don't know how to set it ..So I just add specify pkg regexp
There was a problem hiding this comment.
I think i had to workaround this in rsbuild react router plugin. Will take a look
Description
Add source.include will work in react-refresh-loader as well, which may cause missing
$RefreshReg$in dev mode.So change it to use detail source.include, if users add extra runtime plugins, add it to source.include by manually.
Related Issue
web-infra-dev/rspack#10524
Types of changes
Checklist