feat: optimize generated getter for const export #14045
Conversation
📦 Binary Size-limit
❌ Size increased by 4.00KB from 61.92MB to 61.92MB (⬆️0.01%) |
Rsdoctor Bundle Diff Analysis
Found 6 projects in monorepo, 6 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 popular-libsPath:
📦 Download Diff Report: popular-libs Bundle Diff 📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
Merging this PR will not alter performance
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
This comment was marked as outdated.
This comment was marked as outdated.
|
📝 Benchmark detail: Open
Base persistent cache hit rate:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
export constcodegen by emitting value bindings in__webpack_require__.dinstead of generated getter functions when circular-module information is available and the current module is not circular.__webpack_require__.dcalls at the top while non-circular modules emit them at the end of the module body.__webpack_require__.druntime binding format to support flat definitions like'name', 0, valuefor value exports and'name', () => valuefor getter exports.CircularModulesInfoPluginonly for production/default-production mode, and store circular-module info asOption<IdentifierSet>so an empty set still means the plugin ran and the optimization can apply.Related links
export constto bind readonly values not getters vercel/next.js#82760Checklist