Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

In development mode, Rspack already sets moduleId: 'named' by default. Enabling output.pathinfo adds duplicate metadata on top of that, which leads to unnecessary output bloat.

This PR disables output.pathinfo by default in development to keep the generated code cleaner and easier to read.

Before

"./src/index.js": 
/*!*****************************!*\
  !*** ./src/index.js ***!
  \*****************************/
(function (module, __webpack_exports__, __webpack_require__) {
  // ...
}

After

"./src/index.js": (function (module, __webpack_exports__, __webpack_require__) {
  // ...
}

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@chenjiahan chenjiahan requested a review from hardfist as a code owner November 27, 2025 03:13
Copilot AI review requested due to automatic review settings November 27, 2025 03:13
@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit 0b1f6c4
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6927c396b2617300082e2ac0
😎 Deploy Preview https://deploy-preview-12306--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Nov 27, 2025
@chenjiahan chenjiahan changed the title fix: disable output.pathinfo by default perf: disable output.pathinfo by default Nov 27, 2025
@github-actions github-actions bot added release: performance release: performance related release(mr only) and removed release: bug fix release: bug related release(mr only) labels Nov 27, 2025
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 disables output.pathinfo by default in Rspack to reduce bundle bloat in development mode. Since Rspack already sets moduleId: 'named' by default in development, the pathinfo comments provide duplicate metadata. The change simplifies generated code and improves readability.

Key changes:

  • Changed default value of output.pathinfo from development-dependent to false
  • Updated documentation to reflect new default behavior and provide clear guidance
  • Updated all test snapshots to reflect removed pathinfo comments (reducing file sizes by ~60-80 bytes per module)

Reviewed changes

Copilot reviewed 170 out of 170 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/rspack/src/config/defaults.ts Core change: sets output.pathinfo default to false instead of development mode dependent
website/docs/en/config/output.mdx Updated English documentation with new default, clearer descriptions, and examples
website/docs/zh/config/output.mdx Updated Chinese documentation with new default, clearer descriptions, and examples
tests/rspack-test/defaultsCases/mode/development.js Removed pathinfo from development mode diff expectations
tests/rspack-test/defaultsCases/cache/cache-filesystem-dev.js Removed pathinfo from cache filesystem development mode expectations
Various snapshot files (200+) Updated to reflect removal of pathinfo comments in generated output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 0b1f6c4 to chore(deps): update dependency @microsoft/api-extractor-model to v7.32.1 (#12292) by renovate[bot]

🙈 Size remains the same at 47.67MB

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 27, 2025

CodSpeed Performance Report

Merging #12306 will not alter performance

Comparing disable_pathinfo_1127 (0b1f6c4) with main (5795e26)

Summary

✅ 17 untouched

@chenjiahan chenjiahan merged commit 7212a5e into main Nov 27, 2025
47 checks passed
@chenjiahan chenjiahan deleted the disable_pathinfo_1127 branch November 27, 2025 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: performance release: performance related release(mr only) 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