1. babel-plugin-syntax-hermes-parser
Babel plugin which switches Babel to use the Hermes parser.
babel-plugin-syntax-hermes-parser
Package: babel-plugin-syntax-hermes-parser
Created by: facebook
Last modified: Wed, 01 May 2024 21:40:38 GMT
Version: 0.21.0
License: MIT
Downloads: 94,639
Repository: https://github.com/facebook/hermes

Install

npm install babel-plugin-syntax-hermes-parser
yarn add babel-plugin-syntax-hermes-parser

babel-plugin-syntax-hermes-parser

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.

Install

Using npm:

 npm install --save-dev babel-plugin-syntax-hermes-parser

or using yarn:

 yarn add babel-plugin-syntax-hermes-parser --dev

Usage

The 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
  }
}

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code