Skip to content

bundler: fix re-exports of the "bun" builtin with --target=bun - #37829

Open
robobun wants to merge 7 commits into
mainfrom
farm/9387196a/bundle-reexport-bun-builtin
Open

bundler: fix re-exports of the "bun" builtin with --target=bun#37829
robobun wants to merge 7 commits into
mainfrom
farm/9387196a/bundle-reexport-bun-builtin

ci: retrigger

69f726c
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 12, 2026 in 24m 9s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/js_printer/lib.rs:2506-2517 Dynamic import("bun") sibling arm still lacks .default — note or fix

Annotations

Check warning on line 2517 in src/js_printer/lib.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Dynamic import("bun") sibling arm still lacks .default — note or fix

The `ImportKind::Dynamic` arm just above (lib.rs:2498-2503) in this same `record.tag == ImportRecordTag::Bun` block still emits `Promise.resolve(globalThis.Bun)`, so bundled `(await import("bun")).default` remains `undefined` while the real module loader gives `.default === Bun` (import-meta.test.js:244). Per REVIEW.md "fix the whole class — parallel switch arms; if a site is intentionally excluded, say so in the PR", worth either handling here or noting the exclusion — fixing it conflicts with