fix: respect RSPACK_BINDING in loader workers#14775
Conversation
📦 Binary Size-limit
🙈 Size remains the same at 66.51MB |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a packaging/runtime mismatch in @rspack/core where Tinypool loader-worker processes could ignore RSPACK_BINDING, causing the main compiler and worker threads to load different native bindings in the same Node process.
Changes:
- Extend the post-build codemod rewrite to apply to both
dist/index.jsanddist/worker.js. - Ensure the loader-worker bundle uses the same
process.env.RSPACK_BINDINGoverride logic as the main entry output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7715a2bb7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
dist/index.jsanddist/worker.jsRSPACK_BINDINGis set@rspack/corebuild, generated bundle assertions, Prettier, and RslintRelated links
Checklist