-
-
Notifications
You must be signed in to change notification settings - Fork 757
revert: "feat: add warning when requireAlias is disabled" #12702
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
Conversation
This reverts commit eb5635c.
✅ Deploy Preview for rspack canceled.
|
chenjiahan
left a comment
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.
Reverted because it may emit unexpected warnings when using libraries like moment.js
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.
Pull request overview
This PR reverts the addition of warning messages when module.parser.javascript.requireAlias is disabled. The revert simplifies the can_rename method signature across the codebase by removing an unused expr parameter.
Changes:
- Removed warning logic that alerted users when
requireAliaswas disabled - Simplified
can_renamemethod signature by removing theexpr: &Exprparameter across all implementations and call sites - Removed test file that verified the warning behavior
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/rspack_plugin_javascript/src/parser_plugin/common_js_imports_parse_plugin.rs | Removed warning generation logic and simplified can_rename signature |
| crates/rspack_plugin_javascript/src/parser_plugin/trait.rs | Updated can_rename trait method signature to remove expr parameter |
| crates/rspack_plugin_javascript/src/parser_plugin/drive.rs | Updated can_rename implementation to match new signature |
| crates/rspack_plugin_javascript/src/parser_plugin/amd/amd_plugin.rs | Updated can_rename implementation to match new signature |
| crates/rspack_plugin_javascript/src/parser_plugin/url_plugin.rs | Updated can_rename implementation to match new signature |
| crates/rspack_plugin_javascript/src/parser_plugin/provide_plugin/parser.rs | Updated can_rename implementation and removed unused Expr import |
| crates/rspack_plugin_javascript/src/parser_plugin/define_plugin/parser.rs | Updated can_rename implementation to match new signature |
| crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk.rs | Updated all call sites to use new can_rename signature |
| tests/rspack-test/configCases/parsing/renaming-disabled/warnings.js | Removed test file that verified warning behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
📦 Binary Size-limit
🎉 Size decreased by 1.00KB from 47.90MB to 47.90MB (⬇️0.00%) |
Reverts #12700