-
Notifications
You must be signed in to change notification settings - Fork 59
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
Expected ";" but found "const" - typescript transformer #997
Comments
This is an issue with |
After looking at the response in the esbuild issue, it's clear this is an issue with the compiler. Export statements are hoisted, which is a term we use for moving code such that it runs at the top-level instead of component-level. It seems like the the variable declaration itself is hoisted, but |
Updated the issue description to focus on incorrect compilation. |
What version of
@astrojs/compiler
are you using?2.8.1
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
In this code sample, the export statement is hoisted, but
as const
is not.as const
is correctly hoisted if the const declaration is only takes up one line.Link to Minimal Reproducible Example
Live Astro Compiler
The text was updated successfully, but these errors were encountered: