Open mkubilayk opened 5 years ago
if (true) { var x = 1; } export { x };
This piece of code works with node --experimental-modules on v12.8.0. On esm v3.2.25, it fails with the following error:
node --experimental-modules
export { x }; ^ SyntaxError: Export 'x' is not defined in module
Expected behaviour is that this should be considered valid syntax and exported value should have value of 1.
1
It looks like the assumption here that the exported names should have a top level declaration is wrong.
This piece of code works with
node --experimental-modules
on v12.8.0. On esm v3.2.25, it fails with the following error:Expected behaviour is that this should be considered valid syntax and exported value should have value of
1
.It looks like the assumption here that the exported names should have a top level declaration is wrong.