You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: [BABEL] /Users/useName/gitlab/react-native-pui/reactNativePui/index.ts: @babel/helper-compilation-targets: 'hermes' is not a valid target
- Did you mean 'chrome'? (While processing: "/Users/useName/gitlab/react-native-pui/reactNativePui/node_modules/@babel/preset-env/lib/index.js")
at validateTargetNames (/Users/useName/gitlab/react-native-pui/reactNativePui/node_modules/@babel/preset-env/node_modules/@babel/helper-compilation-targets/lib/index.js:60:13)
Describe the solution you'd like
Support incoming hermes environment parameters configuration,
like #14944
Hey @chenyulun! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.
Hermes is in compat-table, so we can do this. We already did something similar a couple of months ago, adding support for Deno as you already saw — that PR is a good example to follow.
Since you checked "Would you like to work on this feature?", I'm leaving here some instructions :)
If it is the first time that you contribute to Babel, follow these steps: (you need to have make and yarn available on your machine)
Write a comment there to let other possible contributors know that you are working on this bug.
Fork the repo
Run git clone https://github.com/<YOUR_USERNAME>/babel.git && cd babel
Run yarn && make bootstrap
Wait ⏳
Add Hermes to packages/babel-compat-data. All the JSON files are generated using make build-compat-data.
Run make watch (or make build whenever you change a file)
Add support for Hermes in packages/babel-helper-compilation-targets
Add a test in packages/babel-preset-env (only input.js; output.js will be automatically generated)
yarn jest preset-env to run the tests
If some test outputs don't match but the new results are correct, you can delete the bad output.js files and run the tests again
If you prefer, you can run OVERWRITE=true yarn jest [name-of-the-package-to-test] and they will be automatically updated.
If it is working, run make test to run all the tests
💻
What problem are you trying to solve?
Describe the solution you'd like
Support incoming hermes environment parameters configuration,
like
#14944
Describe alternatives you've considered
No
Documentation, Adoption, Migration Strategy
like
#14944
The text was updated successfully, but these errors were encountered: