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

babel-plugin-syntax-hermes-parser fails to parse decorators #1475

Open
neutraali opened this issue Aug 15, 2024 · 1 comment
Open

babel-plugin-syntax-hermes-parser fails to parse decorators #1475

neutraali opened this issue Aug 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@neutraali
Copy link

I've spent most of the day trying to find info on this issue, but Google is giving me nothing. We're using [email protected] and Flow version 0.238.2 and running into errors while trying to parse decorators. For example:

@exampleDecorator
class Example extends React.Component { ... }

Results in:

Parsing error: unrecognized character '@'
@exampleDecorator

We're using Webpack + babel-loader with the following plugins to try and make things happen:

Is it true that hermes-parser can't deal with decorators or are we missing some obscure config somewhere?

@neutraali neutraali added the bug Something isn't working label Aug 15, 2024
@avp avp added enhancement New feature or request and removed bug Something isn't working labels Aug 16, 2024
@avp
Copy link
Contributor

avp commented Aug 16, 2024

We do plan to add support for parsing decorators, but we haven't done so yet given that they aren't standardized yet. https://github.com/tc39/proposal-decorators is at stage 3, so we'll likely be able to implement this feature soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants