Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register $imports declaration in Babel's scope tracker #75

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

robertknight
Copy link
Owner

@robertknight robertknight commented Aug 25, 2022

This fixes a warning when using this plugin in projects that also use
Babel's TypeScript support.

I haven't been able to find much in the way of documentation on how Babel's "scope tracker" works or how it interacts with methods for inserting nodes in the AST. However the change here mirrors patterns seen in official Babel plugins and commits referenced in babel/babel#10264.

This fixes a warning when using this plugin in projects that also use
Babel's TypeScript support.

See babel/babel#10264
@robertknight robertknight merged commit cf0b5ab into master Aug 25, 2022
@robertknight robertknight deleted the register-imports-decl branch August 25, 2022 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant