Skip to content

Latest commit

 

History

History
 
 

babel-preset-react

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

babel-preset-react

Babel preset for all React plugins.

Install

$ npm install --save-dev babel-preset-react

Usage

Via .babelrc (Recommended)

.babelrc

{
  "presets": ["react"]
}

Via CLI

$ babel script.js --presets react 

Via Node API

require("babel-core").transform("code", {
  presets: ["react"]
});