Syntax JSX
Allow parsing of JSX syntax
Syntax only
This plugin only allows Babel to parse this syntax. If you want to transform it then see transform-react-jsx.
This plugin allows Babel to parse JSX.
Installation
npm install --save-dev babel-plugin-syntax-jsx
Usage
Via .babelrc
(Recommended)
.babelrc
{ "plugins": ["syntax-jsx"] }
Via CLI
babel --plugins syntax-jsx script.js
Via Node API
require("babel-core").transform("code", { plugins: ["syntax-jsx"] });
© 2018 Sebastian McKenzie
Licensed under the MIT License.
http://babeljs.io/docs/plugins/syntax-jsx/