Files
bun.sh/test/regression
Claude Bot 2f73acf35a fix(bundler): deduplicate JSX runtime imports across files
When multiple files in a bundle import from the same external module
(e.g., `react/jsx-dev-runtime`), the bundler now merges them into a
single import statement with all unique named imports.

Before:
```js
// a.js
import { jsxDEV } from "react/jsx-dev-runtime";
// index.js
import { jsxDEV as jsxDEV2, Fragment } from "react/jsx-dev-runtime";
```

After:
```js
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
```

The fix:
1. Merges symbol refs across files so they all point to a canonical
   symbol for each (path, import name) pair
2. Augments the first import statement for each path to include all
   unique imports from all files
3. Removes duplicate import statements from subsequent files

Fixes #3029

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 01:32:08 +00:00
..