-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If a module has multiple exports with the same name, these do not get exported. This can occur when export *
is used to merge exports from multiple files. However, if a duplicate named export actually comes from the same source file, it should be retained.
A simple example:
a.mjs
export const val = 1;
b.mjs
export * from './a.mjs';
c.mjs
export * from './a.mjs';
export * from './b.mjs';
When run in Node, c.mjs
has a single export named val
.
When running through import-in-the-middle
there is no export.
This issues currently affects for the following libraries:
svelte
drizzle-orm
Using these libraries when they have been wrapped by import-in-the-middle
results in errors like:
ReferenceError: X is not defined
The requested module 'M' does not provide an export named 'X'
tposch, wouterds, BryceMehring, yesmeck and pkerschbaum
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working