Files
bun.sh/src
Claude Bot 1e816992e6 fix(bundler): prevent duplicate export statements with code splitting
When code splitting is enabled and a file is both an entry point and
imported by another entry point, the bundler was generating duplicate
export statements. This happened because:

1. generateEntryPointTailJS generates exports for entry point's named exports
2. computeCrossChunkDependencies generates cross_chunk_suffix_stmts for
   symbols that other chunks need to import

Both paths were adding export clauses to the output, resulting in invalid
JavaScript with duplicate `export { symbol }` statements.

The fix skips generating cross_chunk_suffix_stmts for entry point chunks
since generateEntryPointTailJS already handles their exports. The
exports_to_other_chunks map is still populated for the import side.

Fixes #10631

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 07:14:30 +00:00
..
2026-01-23 00:10:48 -08:00
2026-01-23 11:02:26 -08:00
2026-01-23 11:02:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-20 20:56:02 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-12-25 14:00:58 -08:00
2025-11-10 14:38:26 -08:00
2025-10-04 02:17:55 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-25 11:06:24 -08:00
2025-11-10 14:38:26 -08:00
2026-01-07 12:33:21 -08:00
2025-11-10 14:38:26 -08:00
2025-11-20 20:56:02 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2026-01-23 11:02:26 -08:00
2025-12-01 21:59:11 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2026-01-23 11:02:26 -08:00
2025-11-10 14:38:26 -08:00
2026-01-23 11:02:26 -08:00