-
Notifications
You must be signed in to change notification settings - Fork 143
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
Exports before declaration don't work #671
Comments
What I did to fix in my project was moving all statements ( If you think this is an acceptable fix, I'm happy to send a PR. |
duailibe
changed the title
Exports before declaration doesn't work
Exports before declaration don't work
Dec 23, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there!
I've recently started to migrate a relatively big project from Babel to Sucrase and hit a (not so much) blocker. We have a few files that reference
export { foo }
before theconst foo
declaration, which should be valid per spec and works with Babel and TypeScript.Given the source
Sucrase will compile to:
And both Babel and TypeScript will compile to:
(Sucrase link here)
This is kind of minor and I could just run a codemod on our codebase, but I figured this might be something worth fixing.
The text was updated successfully, but these errors were encountered: