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

  • 9.0.0                                ...           latest (15 days ago)
  • 8.0.0-next.74                                ...           next (a month ago)

57 Versions

  • 9.0.0                                ...           15 days ago
  • 8.0.0                                ...           a month ago
  • 8.0.0-next.74                                ...           a month ago
  • 8.0.0-next.b0cbf2ca                                ...           2 months ago
  • 7.0.2                                ...           3 months ago
  • 7.0.1                                ...           3 months ago
  • 7.0.1-next.6a95aae9                                ...           5 months ago
  • 7.0.0                                ...           5 months ago
  • 6.1.0                                ...           7 months ago
  • 6.0.0                                ...           7 months ago
  • 5.0.5-next.c662dfb0                                ...           7 months ago
  • 5.0.5-next.9b4009d7                                ...           7 months ago
  • 5.0.4                                ...           7 months ago
  • 5.0.3                                ...           8 months ago
  • 5.0.2                                ...           8 months ago
  • 5.0.1                                ...           8 months ago
  • 5.0.0                                ...           8 months ago
  • 4.0.0                                ...           8 months ago
  • 4.0.0-next.fb6e6f70                                ...           8 months ago
  • 4.0.0-next.2150693d                                ...           8 months ago
  • 4.0.0-next.a671462c                                ...           9 months 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                                ...           a year ago
  • 4.0.0-next.096703ab                                ...           a year ago
  • 3.1.1                                ...           a year 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                                ...           2 years ago
  • 2.0.0                                ...           2 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 104
This Week 8,502
This Month 40,298
Last Day 2,206
Last Week 13,544
Last Month 50,945
Dev Dependencies (0)
None
Dependents (3211)

Copyright 2014 - 2018 © taobao.org |