Skip to content

docs(lazy-barrel): clarify own-exports behavior for import-then-export records#9298

Merged
graphite-app[bot] merged 1 commit into
mainfrom
05-05-docs_lazy-barrel_clarify_own-exports_behavior_for_import-then-export_records
May 6, 2026
Merged

docs(lazy-barrel): clarify own-exports behavior for import-then-export records#9298
graphite-app[bot] merged 1 commit into
mainfrom
05-05-docs_lazy-barrel_clarify_own-exports_behavior_for_import-then-export_records

Conversation

@shulaoda

@shulaoda shulaoda commented May 5, 2026

Copy link
Copy Markdown
Member

Related to #8895

Summary

Updates docs/in-depth/lazy-barrel-optimization.md to reflect the behavior introduced by #8895.

The "Own exports (non-pure re-export barrels)" section did not previously cover the import-then-export pattern (import { a } from './a'; export { a }). After #8895, the loader distinguishes:

  • Dedicated re-export records (export { .. } from '..', export * as ns from '..'): when the barrel must execute, these can still fall back to an empty specifier set if their binding is not requested by main.js.
  • Shared import records (produced by import { a } from '..'; export { a }): always keep their full specifiers, because Rolldown cannot statically determine whether the barrel's own code references the binding.

Changes

  • Extended the example in "Own exports" to include an import { e } from './e'; export { e } case.
  • Added a bullet describing how e.js is loaded with e requested.
  • Added a paragraph explicitly drawing the distinction between dedicated re-export records and shared import records, noting the precondition (barrel must execute because its own exports are loaded by main.js).

@netlify

netlify Bot commented May 5, 2026

Copy link
Copy Markdown

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 3c6914a
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69fae697002fd20008b98988
😎 Deploy Preview https://deploy-preview-9298--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

hyfdev commented May 6, 2026

Copy link
Copy Markdown
Member

Merge activity

…t records (#9298)

Related to #8895

## Summary

Updates `docs/in-depth/lazy-barrel-optimization.md` to reflect the behavior introduced by #8895.

The "Own exports (non-pure re-export barrels)" section did not previously cover the import-then-export pattern (`import { a } from './a'; export { a }`). After #8895, the loader distinguishes:

- **Dedicated re-export records** (`export { .. } from '..'`, `export * as ns from '..'`): when the barrel must execute, these can still fall back to an empty specifier set if their binding is not requested by `main.js`.
- **Shared import records** (produced by `import { a } from '..'; export { a }`): always keep their full specifiers, because Rolldown cannot statically determine whether the barrel's own code references the binding.

## Changes

- Extended the example in "Own exports" to include an `import { e } from './e'; export { e }` case.
- Added a bullet describing how `e.js` is loaded with `e` requested.
- Added a paragraph explicitly drawing the distinction between dedicated re-export records and shared import records, noting the precondition (barrel must execute because its own exports are loaded by main.js).
@graphite-app
graphite-app Bot force-pushed the 05-05-docs_lazy-barrel_clarify_own-exports_behavior_for_import-then-export_records branch from 5cb78dc to 3c6914a Compare May 6, 2026 06:58
@graphite-app
graphite-app Bot merged commit 3c6914a into main May 6, 2026
32 checks passed
@graphite-app
graphite-app Bot deleted the 05-05-docs_lazy-barrel_clarify_own-exports_behavior_for_import-then-export_records branch May 6, 2026 07:00
@rolldown-guard rolldown-guard Bot mentioned this pull request May 7, 2026
@shulaoda shulaoda mentioned this pull request May 7, 2026
shulaoda added a commit that referenced this pull request May 7, 2026
## [1.0.0] - 2026-05-07

### 🐛 Bug Fixes

- dev/lazy: lazily compiled modules should be watched (#9301) by @h-a-n-a
- implement dynamic dominator merge logic (#9270) by @TheAlexLichter
- dev: apply __toCommonJS interop when CJS requires ESM in HMR finalizer (#9261) by @h-a-n-a

### 🚜 Refactor

- ecma_ast: tighten allocator access to enforce Sync invariant (#9278) by @IWANABETHATGUY
- scan_stage: remove stmt_infos field from EcmaView (#9276) by @IWANABETHATGUY
- link_stage: detach stmt_infos from EcmaView (#9274) by @IWANABETHATGUY
- link_stage: detach depended_runtime_helper from EcmaView to remove unsafe (#9265) by @IWANABETHATGUY
- link_stage: remove unsafe in determine_module_exports_kind (#9253) by @IWANABETHATGUY

### 📚 Documentation

- getting-started: remove RC warning for 1.0.0 release (#9310) by @shulaoda
- getting-started: update version references for 1.0.0 release (#9309) by @shulaoda
- add Vite+ tab to getting-started snippets (#9285) by @shulaoda
- lazy-barrel: clarify own-exports behavior for import-then-export records (#9298) by @shulaoda
- restructure top navigation around Learn vs Reference (#9284) by @shulaoda
- builtin-plugins: add bundle analyzer plugin docs (#9292) by @shulaoda
- design doc for reference_needed_symbols (#9264) by @IWANABETHATGUY

### ⚡ Performance

- devtools: write logs on a background thread (#9219) by @IWANABETHATGUY

### ⚙️ Miscellaneous Tasks

- mark esbuild/ts/parameter_props_use_define_for_class_fields_true as passed (#9308) by @sapphi-red
- deps: upgrade oxc to 0.129.0 (#9297) by @shulaoda
- deps: update rollup submodule for tests to v4.60.3 (#9294) by @sapphi-red
- deps: update test262 submodule for tests (#9295) by @sapphi-red
- ai: add rolldown REPL decode skill (#9245) by @Dunqing
pull Bot pushed a commit to olrtg/rolldown that referenced this pull request May 7, 2026
## [1.0.0] - 2026-05-07

### 🐛 Bug Fixes

- dev/lazy: lazily compiled modules should be watched (rolldown#9301) by @h-a-n-a
- implement dynamic dominator merge logic (rolldown#9270) by @TheAlexLichter
- dev: apply __toCommonJS interop when CJS requires ESM in HMR finalizer (rolldown#9261) by @h-a-n-a

### 🚜 Refactor

- ecma_ast: tighten allocator access to enforce Sync invariant (rolldown#9278) by @IWANABETHATGUY
- scan_stage: remove stmt_infos field from EcmaView (rolldown#9276) by @IWANABETHATGUY
- link_stage: detach stmt_infos from EcmaView (rolldown#9274) by @IWANABETHATGUY
- link_stage: detach depended_runtime_helper from EcmaView to remove unsafe (rolldown#9265) by @IWANABETHATGUY
- link_stage: remove unsafe in determine_module_exports_kind (rolldown#9253) by @IWANABETHATGUY

### 📚 Documentation

- getting-started: remove RC warning for 1.0.0 release (rolldown#9310) by @shulaoda
- getting-started: update version references for 1.0.0 release (rolldown#9309) by @shulaoda
- add Vite+ tab to getting-started snippets (rolldown#9285) by @shulaoda
- lazy-barrel: clarify own-exports behavior for import-then-export records (rolldown#9298) by @shulaoda
- restructure top navigation around Learn vs Reference (rolldown#9284) by @shulaoda
- builtin-plugins: add bundle analyzer plugin docs (rolldown#9292) by @shulaoda
- design doc for reference_needed_symbols (rolldown#9264) by @IWANABETHATGUY

### ⚡ Performance

- devtools: write logs on a background thread (rolldown#9219) by @IWANABETHATGUY

### ⚙️ Miscellaneous Tasks

- mark esbuild/ts/parameter_props_use_define_for_class_fields_true as passed (rolldown#9308) by @sapphi-red
- deps: upgrade oxc to 0.129.0 (rolldown#9297) by @shulaoda
- deps: update rollup submodule for tests to v4.60.3 (rolldown#9294) by @sapphi-red
- deps: update test262 submodule for tests (rolldown#9295) by @sapphi-red
- ai: add rolldown REPL decode skill (rolldown#9245) by @Dunqing

Co-authored-by: shulaoda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants