Skip to content

Conversation

@LingyuCoder
Copy link
Contributor

Reverts #12700

Copilot AI review requested due to automatic review settings January 12, 2026 07:43
@netlify
Copy link

netlify bot commented Jan 12, 2026

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 377cdcd
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6964a615e0e8ca0008ef5d7b

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Jan 12, 2026
Copy link
Member

@chenjiahan chenjiahan left a 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

@chenjiahan chenjiahan enabled auto-merge (squash) January 12, 2026 07:44
Copy link
Contributor

Copilot AI left a 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 requireAlias was disabled
  • Simplified can_rename method signature by removing the expr: &Expr parameter 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.

@github-actions
Copy link
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 825.4 KB 0
react-5k 2.7 MB 0
rome 984.3 KB 0
ui-components 2.1 MB 0

Generated by Rsdoctor GitHub Action

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 12, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing revert-12700-feat/require-alias-warning (377cdcd) with main (eb5635c)

Summary

✅ 16 untouched benchmarks
⏩ 1 skipped benchmark1

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@LingyuCoder LingyuCoder changed the title Revert "feat: add warning when requireAlias is disabled" revert: "feat: add warning when requireAlias is disabled" Jan 12, 2026
@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 377cdcd to feat: add warning when requireAlias is disabled (#12700) by harpsealjs

🎉 Size decreased by 1.00KB from 47.90MB to 47.90MB (⬇️0.00%)

@chenjiahan chenjiahan disabled auto-merge January 12, 2026 09:38
@chenjiahan chenjiahan merged commit b21d2ec into main Jan 12, 2026
60 of 63 checks passed
@chenjiahan chenjiahan deleted the revert-12700-feat/require-alias-warning branch January 12, 2026 09:38
LingyuCoder added a commit that referenced this pull request Jan 14, 2026
Revert "feat: add warning when requireAlias is disabled (#12700)"

This reverts commit eb5635c.
LingyuCoder added a commit that referenced this pull request Jan 14, 2026
Revert "feat: add warning when requireAlias is disabled (#12700)"

This reverts commit eb5635c.
hardfist pushed a commit that referenced this pull request Jan 14, 2026
Revert "feat: add warning when requireAlias is disabled (#12700)"

This reverts commit eb5635c.
LingyuCoder added a commit that referenced this pull request Jan 15, 2026
Revert "feat: add warning when requireAlias is disabled (#12700)"

This reverts commit eb5635c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants