Skip to content

Commit e8eb1d1

Browse files
nicholaslee119SimenB
authored andcommitted
replace preset-es2015 with preset-env (#5346)
preset-es2015 was already deprecated and should be replaced by preset-env
1 parent f040725 commit e8eb1d1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/GettingStarted.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ _Note: Explicitly installing `regenerator-runtime` is not needed if you use
9797
Don't forget to add a [`.babelrc`](https://babeljs.io/docs/usage/babelrc/) file
9898
in your project's root folder. For example, if you are using ES6 and
9999
[React.js](https://facebook.github.io/react/) with the
100-
[`babel-preset-es2015`](https://babeljs.io/docs/plugins/preset-es2015/) and
100+
[`babel-preset-env`](https://babeljs.io/docs/plugins/preset-env/) and
101101
[`babel-preset-react`](https://babeljs.io/docs/plugins/preset-react/) presets:
102102
103103
```json
104104
{
105-
"presets": ["es2015", "react"]
105+
"presets": ["env", "react"]
106106
}
107107
```
108108
@@ -113,16 +113,16 @@ You are now set up to use all ES6 features and React specific syntax.
113113
> `test`. It will not use `development` section like Babel does by default when
114114
> no `NODE_ENV` is set.
115115
116-
> Note: If you've turned off transpilation of ES2015 modules with the option
116+
> Note: If you've turned off transpilation of ES6 modules with the option
117117
> `{ "modules": false }`, you have to make sure to turn this on in your test
118118
> environment.
119119
120120
```json
121121
{
122-
"presets": [["es2015", {"modules": false}], "react"],
122+
"presets": [["env", {"modules": false}], "react"],
123123
"env": {
124124
"test": {
125-
"presets": [["es2015"], "react"]
125+
"presets": [["env"], "react"]
126126
}
127127
}
128128
}

0 commit comments

Comments
 (0)