package
Babel plugin which switches Babel to use the Hermes parser.
npm install babel-plugin-syntax-hermes-parserGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Hermes parser plugin for Babel. This plugin switches Babel to use hermes-parser instead of the @babel/parser. Since Hermes parser uses C++ compiled to WASM it is significantly faster and provides full syntax support for Flow.
Using npm:
npm install --save-dev babel-plugin-syntax-hermes-parseror using yarn:
yarn add babel-plugin-syntax-hermes-parser --devThe plugin can be enabled via:
// babel.config.json
{
"plugins": ["babel-plugin-syntax-hermes-parser"]
}If parser options need to be provide you can do so via the parserOpts config:
// babel.config.json
{
"plugins": ["babel-plugin-syntax-hermes-parser"],
"parserOpts": {
"allowReturnOutsideFunction": true
}
}Estimated unpacked size across 3 packages.
2.0 MB
Includes dependencies.