Conversation
✅ Deploy Preview for rspack canceled.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the treatment of the module identifier in the rslib parser to prevent it from being handled as a special webpack construct. The change ensures that the module identifier is treated as a normal JavaScript identifier rather than being transformed into webpack-specific code.
- Adds an identifier hook in the rslib parser plugin to intercept
moduleidentifier handling - Updates test cases to verify that
modulereferences are preserved in the output and not transformed to__webpack_require__
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/rspack_plugin_rslib/src/parser_plugin.rs | Implements identifier hook to treat module as normal identifier |
| packages/rspack-test-tools/tests/configCases/rslib/plugin-api/index.js | Adds test case with module usage in function |
| packages/rspack-test-tools/tests/configCases/rslib/plugin-api/test.js | Adds assertions to verify module is not transformed |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Contributor
📦 Binary Size-limit
🎉 Size decreased by 17.63KB from 47.30MB to 47.29MB (⬇️0.04%) |
CodSpeed Performance ReportMerging #11588 will not alter performanceComparing Summary
Footnotes |
JSerFeng
approved these changes
Sep 5, 2025
fi3ework
added a commit
that referenced
this pull request
Sep 10, 2025
…)"" This reverts commit b0ec093.
2 tasks
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
do not treat
moduleas a special identifier in Rslib.Related links
Checklist