Socket
Socket
Sign inDemoInstall

babel-plugin-syntax-jsx

Package Overview
Dependencies
0
Maintainers
5
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-syntax-jsx

Allow parsing of jsx


Version published
Weekly downloads
3.6M
decreased by-11.3%
Maintainers
5
Install size
1.83 kB
Created
Weekly downloads
 

Package description

What is babel-plugin-syntax-jsx?

The babel-plugin-syntax-jsx npm package allows Babel to parse JSX syntax. This plugin only enables parsing and does not apply transformations. It is typically used in conjunction with other plugins or presets to transform JSX into valid JavaScript code that browsers can understand.

What are babel-plugin-syntax-jsx's main functionalities?

JSX Parsing

This code demonstrates how JSX syntax can be included in JavaScript files. The babel-plugin-syntax-jsx allows such JSX syntax to be parsed without transforming it, serving as a foundation for other transformation plugins.

import React from 'react';

const element = <div>Hello, world!</div>;

Other packages similar to babel-plugin-syntax-jsx

Readme

Source

babel-plugin-syntax-jsx

Allow parsing of JSX

Installation

npm install --save-dev babel-plugin-syntax-jsx

Usage

.babelrc

{
  "plugins": ["syntax-jsx"]
}

Via CLI

babel --plugins syntax-jsx script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["syntax-jsx"]
});

Keywords

FAQs

Last updated on 19 Sep 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc