[Bug]: plugin-transform-modules-systemjs transformation is unsafe #13888
Labels
area: modules
i: bug
i: needs triage
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: traverse (scope)
馃捇
How are you using Babel?
Programmatic API (
babel.transform
,babel.parse
)Input code
REPL.
Configuration file name
No response
Configuration
Using
@babel/plugin-transform-modules-systemjs
, nothing elseCurrent and expected behavior
I would expect the
x = 1
to declare a local constant, as it does in the original code. Instead, it assigns to a new module-level variable (which in this case has the same name as an import, causing an error).Environment
Possible solution
No response
Additional context
cc @guybedford :)
The text was updated successfully, but these errors were encountered: