babel-preset-react-app
Babel preset used by Create React App
Last updated 2 months ago by iansu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-preset-react-app 
SYNC missed versions from official npm registry.

babel-preset-react-app

This package includes the Babel preset used by Create React App.
Please refer to its documentation:

Usage in Create React App Projects

The easiest way to use this configuration is with Create React App, which includes it by default. You don’t need to install it separately in Create React App projects.

Usage Outside of Create React App

If you want to use this Babel preset in a project not built with Create React App, you can install it with the following steps.

First, install Babel.

Then install babel-preset-react-app.

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

Then create a file named .babelrc with following contents in the root folder of your project:

{
  "presets": ["react-app"]
}

This preset uses the useBuiltIns option with transform-object-rest-spread and transform-react-jsx, which assumes that Object.assign is available or polyfilled.

Usage with Flow

Make sure you have a .flowconfig file at the root directory. You can also use the flow option on .babelrc:

{
  "presets": [["react-app", { "flow": true, "typescript": false }]]
}

Usage with TypeScript

Make sure you have a tsconfig.json file at the root directory. You can also use the typescript option on .babelrc:

{
  "presets": [["react-app", { "flow": false, "typescript": true }]]
}

Current Tags

  • 9.0.0                                ...           latest (2 months ago)
  • 8.0.0-next.74                                ...           next (3 months ago)

57 Versions

  • 9.0.0                                ...           2 months ago
  • 8.0.0                                ...           3 months ago
  • 8.0.0-next.74                                ...           3 months ago
  • 8.0.0-next.b0cbf2ca                                ...           4 months ago
  • 7.0.2                                ...           5 months ago
  • 7.0.1                                ...           5 months ago
  • 7.0.1-next.6a95aae9                                ...           7 months ago
  • 7.0.0                                ...           7 months ago
  • 6.1.0                                ...           9 months ago
  • 6.0.0                                ...           9 months ago
  • 5.0.5-next.c662dfb0                                ...           9 months ago
  • 5.0.5-next.9b4009d7                                ...           9 months ago
  • 5.0.4                                ...           9 months ago
  • 5.0.3                                ...           10 months ago
  • 5.0.2                                ...           10 months ago
  • 5.0.1                                ...           10 months ago
  • 5.0.0                                ...           10 months ago
  • 4.0.0                                ...           10 months ago
  • 4.0.0-next.fb6e6f70                                ...           10 months ago
  • 4.0.0-next.2150693d                                ...           10 months ago
  • 4.0.0-next.a671462c                                ...           a year ago
  • 3.1.2                                ...           a year ago
  • 4.0.0-next.3e165448                                ...           a year ago
  • 4.0.0-next.66cc7a90                                ...           a year ago
  • 4.0.0-next.b2fd8db8                                ...           a year ago
  • 4.0.0-next.47d2d941                                ...           a year ago
  • 4.0.0-next.03604a46                                ...           a year ago
  • 4.0.0-next.9754a231                                ...           2 years ago
  • 4.0.0-next.096703ab                                ...           2 years ago
  • 3.1.1                                ...           2 years ago
  • 3.1.0                                ...           2 years ago
  • 3.0.3                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           2 years ago
  • 3.0.0-alpha.60ae2b6d                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 3.0.0-alpha.55afd862                                ...           2 years ago
  • 3.0.0-alpha.02968ecd                                ...           2 years ago
  • 3.0.0-alpha.0d0536f9                                ...           2 years ago
  • 3.0.0-alpha.c82c4f05                                ...           2 years ago
  • 3.0.0-alpha.e280254d                                ...           2 years ago
  • 3.0.0-alpha.134d2297                                ...           2 years ago
  • 3.0.0-alpha.dadf93b2                                ...           2 years ago
  • 3.0.0-alpha.58689133                                ...           2 years ago
  • 3.0.0-alpha.f55d2212                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.1                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.0-alpha.9c45b252                                ...           3 years ago
  • 1.0.0-alpha.e756d73a                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.0                                ...           3 years ago
Downloads
Today 68
This Week 4,395
This Month 41,271
Last Day 2,265
Last Week 12,255
Last Month 47,600
Dev Dependencies (0)
None
Dependents (3494)

Copyright 2014 - 2016 © taobao.org |