diff --git a/README.md b/README.md index d5e4357b8057..6a9e0a053b98 100644 --- a/README.md +++ b/README.md @@ -116,12 +116,12 @@ _Note: Explicitly installing `regenerator-runtime` is not needed if you use Don't forget to add a [`.babelrc`](https://babeljs.io/docs/usage/babelrc/) file in your project's root folder. For example, if you are using ES6 and [React.js](https://facebook.github.io/react/) with the -[`babel-preset-es2015`](https://babeljs.io/docs/plugins/preset-es2015/) and +[`babel-preset-env`](https://babeljs.io/docs/plugins/preset-env/) and [`babel-preset-react`](https://babeljs.io/docs/plugins/preset-react/) presets: ```json { - "presets": ["es2015", "react"] + "presets": ["env", "react"] } ``` @@ -132,16 +132,16 @@ You are now set up to use all ES6 features and React specific syntax. > `test`. It will not use `development` section like Babel does by default when > no `NODE_ENV` is set. -> Note: If you've turned off transpilation of ES2015 modules with the option +> Note: If you've turned off transpilation of ES modules with the option > `{ "modules": false }`, you have to make sure to turn this on in your test > environment. ```json { - "presets": [["es2015", {"modules": false}], "react"], + "presets": [["env", {"modules": false}], "react"], "env": { "test": { - "presets": [["es2015"], "react"] + "presets": [["env"], "react"] } } } diff --git a/docs/TutorialReact.md b/docs/TutorialReact.md index ce9e92359592..6284ca7d8fd5 100644 --- a/docs/TutorialReact.md +++ b/docs/TutorialReact.md @@ -27,7 +27,7 @@ Also see [using babel](GettingStarted.md#using-babel). Run ```bash -npm install --save-dev jest babel-jest babel-preset-es2015 babel-preset-react react-test-renderer +npm install --save-dev jest babel-jest babel-preset-env babel-preset-react react-test-renderer ``` Your `package.json` should look something like this (where `` @@ -42,7 +42,7 @@ jest configuration entries: }, "devDependencies": { "babel-jest": "", - "babel-preset-es2015": "", + "babel-preset-env": "", "babel-preset-react": "", "jest": "", "react-test-renderer": "" @@ -55,7 +55,7 @@ jest configuration entries: ```json // .babelrc { - "presets": ["es2015", "react"] + "presets": ["env", "react"] } ```