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

With recent versions of babel, type imports don't get correctly converted to runtime type imports [working on a fix] #254

Closed
jedwards1211 opened this issue Dec 29, 2020 · 0 comments · Fixed by #255
Labels

Comments

@jedwards1211
Copy link
Collaborator

After debugging I uncovered this apparent regression in @babel/traverse: babel/babel#12570

It's causing the ImportDeclaration exit visitor to not get called in some cases, causing

import { type Foo } from './Foo'

To get converted to

require('./Foo')

Instead of the expected

const { Foo: _Foo } = require('./Foo')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants