package
Babel preset for all React plugins.
npm install babel-preset-reactGitHub-flavored package documentation.
Across all versions, last 30 days.
2,349,947 in 30 days
Runtime metadata.
Estimated unpacked size across 15 packages.
1.4 MB
Includes dependencies.
6 direct dependencies.
^6.23.0
6.23.0
^6.3.13
6.18.0
6.24.1
6.22.0
6.22.0
6.25.0
Latest published Apr 7, 2017
Babel preset for all React plugins.
This preset includes the following plugins/presets:
Registry package owners.
You can also check out the React Getting Started page
Install the CLI and this preset
npm install --save-dev babel-cli babel-preset-reactMake a .babelrc config file with the preset
echo '{ "presets": ["react"] }' > .babelrcCreate a file to run on
echo '<h1>Hello, world!</h1>' > index.jsView the output
./node_modules/.bin/babel index.js.babelrc (Recommended).babelrc
{
"presets": ["react"]
}babel script.js --presets react require("babel-core").transform("code", {
presets: ["react"]
});