Open pax-k opened 1 week ago
That's correct, the Hermes parser doesn't currently support static blocks. We are adding them.
@tmikov Why did this work in the past versions? Now it seems that @babel/plugin-transform-class-static-block
doesn't transform anymore.
@pax-k this was never supported by the Hermes parser. We have a diff in progress, it should land very soon.
I am not closely familiar with the RN Babel setup, but in previous versions you probably weren't using the Hermes parser at all. I believe recently RN switched to the Hermes parser, because it supports extended Flow features and is faster (since it is written in C++).
Minimal reproducible example
https://github.com/pax-k/jazz-rn-babel-issue
What platform(s) does this occur on?
Android, iOS, Web
Where did you reproduce the issue?
in a development build
Summary
Even if
@babel/plugin-transform-class-static-block
is added to babel.config.js:When running the Metro bundler,
expo export --platform ios
fails with:The error comes from Hermes: https://github.com/facebook/hermes/blob/b07ef4fc10dd53ad542f811040c820064c5ceb57/lib/Parser/JSParserImpl.cpp#L3131
This works in Expo SDK 51 (example here)
Environment
Expo Doctor Diagnostics