Comments (3)
The Hermes parser supports the syntax, but the Hermes runtime does not currently have a supported implementation of ESM (ES6 modules).
The main reason is that React Native relies on bundler (usually Metro) which provides its own non-standard implementation of ESM, with various customizations, so the Hermes implementation would not even be used.
This is unfortunate, because built-in support of ESM provides opportunities for a number of important optimizations (like inter-module inlining). Static Hermes will eventually provide ESM, but as of now it still doesn't either.
from hermes.
Thanks for the fast response @tmikov ! This is unfortunate
And what about commonjs syntax? It also seems to work with -commonjs flag but not when using JSI
from hermes.
JSI is an API to access the VM at runtime, it is orthogonal to this. Hermes does ship with a runtime implementation of commonjs, but it is unsupported and we don't recommend using it.
from hermes.
Related Issues (20)
- Intentional fallthrough? HOT 4
- RangeError: Maximum callstack size exceeded with many modules in single bundle HOT 20
- "HBC version" should be reflected in the documentation or the file name HOT 1
- In iOS, is it possible to compile Hermes as a static library instead of a dynamic library? HOT 1
- Wrong bytecode version with hbcdump HOT 1
- Bug in scoped function promotion (non-strict mode) HOT 3
- Problems loading emscripten compiled js file in Hermes. Works on JSC/V8. HOT 6
- Invalid Source map HOT 1
- [hermes-parser] Support Import Attributes HOT 1
- When I CrossCompilation build for android, I got the error, the branch is 'rn/0.74-stable' HOT 3
- SyntaxError: Invalid RegExp: Invalid escape, js engine: hermes HOT 3
- Failed to build CLI on Linux HOT 2
- Intl.PluralRules support
- Fail to build android dynamic lib 'libhermes.so' in branch 'origin/static_h' HOT 4
- Intl.NumberFormat signDisplay option displays odd behaviour HOT 1
- instanceof on host objects HOT 16
- Symbol.hasInstance is not used in instanceof lookup HOT 2
- Catch JSErrors in C++ HOT 1
- babel-plugin-syntax-hermes-parser fails to parse decorators HOT 1
- Promise.allSettled undefined on iOS and Android using Hermes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hermes.