babel-preset-react-app
Babel preset used by Create React App
Last updated 18 days 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

  • 7.0.2                                ...           latest (18 days ago)
  • 8.0.0-next.b0cbf2ca                                ...           next (9 days ago)

54 Versions

  • 8.0.0-next.b0cbf2ca                                ...           9 days ago
  • 7.0.2                                ...           18 days ago
  • 7.0.1                                ...           a month ago
  • 7.0.1-next.6a95aae9                                ...           3 months ago
  • 7.0.0                                ...           3 months ago
  • 6.1.0                                ...           5 months ago
  • 6.0.0                                ...           5 months ago
  • 5.0.5-next.c662dfb0                                ...           5 months ago
  • 5.0.5-next.9b4009d7                                ...           5 months ago
  • 5.0.4                                ...           5 months ago
  • 5.0.3                                ...           6 months ago
  • 5.0.2                                ...           6 months ago
  • 5.0.1                                ...           6 months ago
  • 5.0.0                                ...           6 months ago
  • 4.0.0                                ...           6 months ago
  • 4.0.0-next.fb6e6f70                                ...           6 months ago
  • 4.0.0-next.2150693d                                ...           6 months ago
  • 4.0.0-next.a671462c                                ...           7 months ago
  • 3.1.2                                ...           9 months ago
  • 4.0.0-next.3e165448                                ...           9 months 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                                ...           a year ago
  • 4.0.0-next.096703ab                                ...           a year ago
  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.3                                ...           a year 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                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.0-alpha.9c45b252                                ...           2 years ago
  • 1.0.0-alpha.e756d73a                                ...           2 years ago
  • 1.0.0                                ...           2 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 31
This Week 31
This Month 41,156
Last Day 728
Last Week 12,268
Last Month 29,035
Dev Dependencies (0)
None
Dependents (2960)

Copyright 2014 - 2016 © taobao.org |