@babel/plugin-syntax-jsx
Installation
npm install --save-dev @babel/plugin-syntax-jsx
Usage
With a configuration file (Recommended)
{
"plugins": ["@babel/plugin-syntax-jsx"]
}
Via CLI
babel --plugins @babel/plugin-syntax-jsx script.js
Via Node API
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-syntax-jsx"]
});