-
-
Notifications
You must be signed in to change notification settings - Fork 746
chore: simplify import comment style in output code #12163
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
✅ Deploy Preview for rspack canceled.
|
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 simplifies comment annotations in compiled webpack output by removing the "ESM" prefix from import/export comments, making them shorter and clearer while maintaining readability.
- Changed comment format from
/* ESM import */to/* import */ - Changed comment format from
/* ESM default export */and variants to/* export default */and corresponding variants - Updated all test snapshots to reflect the new comment format
Reviewed Changes
Copilot reviewed 112 out of 112 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/rspack_plugin_javascript/src/dependency/esm/esm_export_expression_dependency.rs | Updated export default comment formats in code generation |
| crates/rspack_core/src/dependency/runtime_template.rs | Updated import statement comment formats in code generation |
| tests/rspack-test/treeShakingCases/**/*.snap.txt (75 files) | Updated test snapshots for tree shaking cases |
| tests/rspack-test/statsOutputCases/**/*.txt (3 files) | Updated stats output snapshots with new comment format |
| tests/rspack-test/statsAPICases/*.js (2 files) | Updated hash values due to code changes |
| tests/rspack-test/hookCases/**/output.snap.txt (1 file) | Updated hook case snapshot |
| tests/rspack-test/esmOutputCases/**/*.snap.txt (6 files) | Updated ESM output snapshots |
| tests/rspack-test/diagnosticsCases/**/stats.err (1 file) | Updated error message snapshot |
| tests/rspack-test/builtinCases/**/*.snap.txt (20 files) | Updated builtin test case snapshots |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Binary Size-limit
❌ Size increased by 128bytes from 48.09MB to 48.09MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #12163 will not alter performanceComparing Summary
|
Summary
Replaced verbose comments like
/* ESM import */and/* ESM default export */with shorter, clearer forms./* ESM import */→/* import *//* ESM default export */→/* export default */This keeps the annotations readable while reducing noise in the compiled output.
Related links
Checklist