babel-preset-react-app 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +6 -0
- package/index.js +4 -0
- package/package.json +2 -1
package/README.md
CHANGED
@@ -16,6 +16,12 @@ If you want to use this Babel preset in a project not built with Create React Ap
|
|
16
16
|
|
17
17
|
First, [install Babel](https://babeljs.io/docs/setup/).
|
18
18
|
|
19
|
+
Then install babel-preset-react-app.
|
20
|
+
|
21
|
+
```sh
|
22
|
+
npm install babel-preset-react-app --save-dev
|
23
|
+
```
|
24
|
+
|
19
25
|
Then create a file named `.babelrc` with following contents in the root folder of your project:
|
20
26
|
|
21
27
|
```js
|
package/index.js
CHANGED
@@ -7,6 +7,10 @@
|
|
7
7
|
'use strict';
|
8
8
|
|
9
9
|
const plugins = [
|
10
|
+
// Necessary to include regardless of the environment because
|
11
|
+
// in practice some other transforms (such as object-rest-spread)
|
12
|
+
// don't work without it: https://github.com/babel/babel/issues/7215
|
13
|
+
require.resolve('babel-plugin-transform-es2015-destructuring'),
|
10
14
|
// class { handleClick = () => { } }
|
11
15
|
require.resolve('babel-plugin-transform-class-properties'),
|
12
16
|
// The following two plugins use Object.assign directly, instead of Babel's
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babel-preset-react-app",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.1",
|
4
4
|
"description": "Babel preset used by Create React App",
|
5
5
|
"repository": "facebookincubator/create-react-app",
|
6
6
|
"license": "MIT",
|
@@ -14,6 +14,7 @@
|
|
14
14
|
"babel-plugin-dynamic-import-node": "1.1.0",
|
15
15
|
"babel-plugin-syntax-dynamic-import": "6.18.0",
|
16
16
|
"babel-plugin-transform-class-properties": "6.24.1",
|
17
|
+
"babel-plugin-transform-es2015-destructuring": "6.23.0",
|
17
18
|
"babel-plugin-transform-object-rest-spread": "6.26.0",
|
18
19
|
"babel-plugin-transform-react-constant-elements": "6.23.0",
|
19
20
|
"babel-plugin-transform-react-jsx": "6.24.1",
|