// mod.js
export var x = 1;
// main.js
import { x } from './mod.js';
The issue is the design of module hygiene assumes bundling of all the modules #662 and so sets up a forwarding binding for each imported name. This greatly simplifies module bundling (just emit each module and bindings take care of themselves) but since we don't have bundling yet we run into this problem.
The solution is a little hacky, only add forwarding bindings to import names when:
fixes #736
Turns out there was an even simpler repro:
The issue is the design of module hygiene assumes bundling of all the modules #662 and so sets up a forwarding binding for each imported name. This greatly simplifies module bundling (just emit each module and bindings take care of themselves) but since we don't have bundling yet we run into this problem.
The solution is a little hacky, only add forwarding bindings to import names when:
Don't merge just yet, I still need to add tests.