#11058·rolldown

A name reachable through two `export *` paths is silently dropped when both re-export it from the same external module

Author: thekhegayCreated Sep 30, 2026Updated Oct 1, 2026

Reproduction link or steps

Four files, plain JS. No plugins, no TypeScript.

src/a.js and src/b.js, identical:

javascript
export { InjectionToken } from 'ext';

src/only-c.js, control:

javascript
export { Injector } from 'ext';

src/index.js:

javascript
export * from './a.js';
export * from './b.js';
export * from './only-c.js';

Build:

javascript
import { rolldown } from 'rolldown';
const bundle = await rolldown({ input: 'src/index.js', external: ['ext'], onLog: (l, m) => console.log(l, m) });
const { output } = await bundle.generate({ format: 'es' });
console.log(output[0].code, output[0].exports);

What is expected?

Both names re-exported. Per ResolveExport, export { InjectionToken } from 'ext' in a.js and in b.js resolve to same record, module ext and binding InjectionToken, so name is not ambiguous and has to be exported.

rollup 4.63.4 on same input with same options:

javascript
export { InjectionToken, Injector } from 'ext';
// exports: ["InjectionToken","Injector"]

What is actually happening?

InjectionToken is dropped from chunk and from output.exports. Star export degrades to plain import. Injector, reachable through one path only, survives.

javascript
import { Injector } from "ext";
export { Injector };
// exports: ["Injector"]

Zero log entries. onLog is never called, so nothing says a name went missing.

Same on 1.2.0, 1.2.8 and 1.2.11, so not a recent regression.

System Info

rolldown 1.2.11
rollup 4.63.4 (for comparison)
Node v24.16.0
darwin 27.0.0

Any additional comments?

Found while testing new Angular CLI library builder, which uses rolldown. Reported and diagnosed there first: https://github.com/angular/angular-cli/issues/34130 Real impact: ng-zorro-antd builds lose NZ_DATE_LOCALE from ng-zorro-antd/i18n, so import { NZ_DATE_LOCALE } from 'ng-zorro-antd/i18n' stops compiling for consumers. Same happens in .d.ts pass. ng-packagr, which uses rollup, keeps the name.

Two paths to one external binding are common in a library barrel, and failure is silent, which is what makes it expensive to find.