babel-preset-react-app 3.0.1 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +6 -0
  2. package/index.js +7 -8
  3. package/package.json +7 -6
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
@@ -1,14 +1,16 @@
1
1
  /**
2
2
  * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  */
9
7
  'use strict';
10
8
 
11
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'),
12
14
  // class { handleClick = () => { } }
13
15
  require.resolve('babel-plugin-transform-class-properties'),
14
16
  // The following two plugins use Object.assign directly, instead of Babel's
@@ -129,10 +131,7 @@ if (env === 'test') {
129
131
 
130
132
  if (env === 'production') {
131
133
  // Optimization: hoist JSX that never changes out of render()
132
- // Disabled because of issues:
133
- // * https://github.com/facebookincubator/create-react-app/issues/525
134
- // * https://phabricator.babeljs.io/search/query/pCNlnC2xzwzx/
135
- // * https://github.com/babel/babel/issues/4516
134
+ // Disabled because of issues: https://github.com/facebookincubator/create-react-app/issues/553
136
135
  // TODO: Enable again when these issues are resolved.
137
136
  // plugins.push.apply(plugins, [
138
137
  // require.resolve('babel-plugin-transform-react-constant-elements')
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "babel-preset-react-app",
3
- "version": "3.0.1",
3
+ "version": "3.1.1",
4
4
  "description": "Babel preset used by Create React App",
5
5
  "repository": "facebookincubator/create-react-app",
6
- "license": "BSD-3-Clause",
6
+ "license": "MIT",
7
7
  "bugs": {
8
8
  "url": "https://github.com/facebookincubator/create-react-app/issues"
9
9
  },
@@ -11,17 +11,18 @@
11
11
  "index.js"
12
12
  ],
13
13
  "dependencies": {
14
- "babel-plugin-dynamic-import-node": "1.0.2",
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-object-rest-spread": "6.23.0",
17
+ "babel-plugin-transform-es2015-destructuring": "6.23.0",
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",
20
21
  "babel-plugin-transform-react-jsx-self": "6.22.0",
21
22
  "babel-plugin-transform-react-jsx-source": "6.22.0",
22
- "babel-plugin-transform-regenerator": "6.24.1",
23
+ "babel-plugin-transform-regenerator": "6.26.0",
23
24
  "babel-plugin-transform-runtime": "6.23.0",
24
- "babel-preset-env": "1.5.2",
25
+ "babel-preset-env": "1.6.1",
25
26
  "babel-preset-react": "6.24.1"
26
27
  },
27
28
  "peerDependencies": {