Sharing an identifier instance between visitors breaks import aliasing #10377
Labels
i: bug
i: needs triage
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Bug Report
Current Behavior
Sharing an identifier instance between visitors breaks import aliasing.
Input Code
babel-plugin.js
example.js
Expected behavior/code
Transpiled in following way:
Produces:
Expected result:
Babel Configuration (.babelrc, package.json, cli command)
babel.config.js
Environment
Possible Solution
I'm a complete rookie when it comes to the babel internals, so I'm probably not fit for producing an actual bugfix, but I can share a workaround that I've made for this issue.
I can namely achieve the expected result by recreating the identifier in each visitor instead:
The text was updated successfully, but these errors were encountered: