Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 0c20865

Browse files
committed
Update babel-env use in doc examples.
1 parent 30e384a commit 0c20865

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ _map([1, 2, 3], addOne)
3838
```json
3939
{
4040
"plugins": ["lodash"],
41-
"presets": ["es2015"]
41+
"presets": [["@babel/env", { "targets": { "node": 6 } }]]
4242
}
4343
```
4444

4545
Set plugin options using an array of `[pluginName, optionsObject]`.
4646
```json
4747
{
4848
"plugins": [["lodash", { "id": "lodash-compat", "cwd": "some/path" }]],
49-
"presets": [["env", { "targets": { "node": 4 } }]]
49+
"presets": [["@babel/env", { "targets": { "node": 6 } }]]
5050
}
5151
```
5252

5353
The `options.id` can be an array of ids.
5454
```json
5555
{
5656
"plugins": [["lodash", { "id": ["async", "lodash-bound"] }]],
57-
"presets": [["env", { "targets": { "node": 4 } }]]
57+
"presets": [["@babel/env", { "targets": { "node": 6 } }]]
5858
}
5959
```
6060

@@ -67,7 +67,7 @@ $ babel --plugins lodash --presets es2015 script.js
6767
```js
6868
require('babel-core').transform('code', {
6969
'plugins': ['lodash'],
70-
'presets': [['env', { 'targets': { 'node': 4 } }]]
70+
'presets': [['@babel/env', { 'targets': { 'node': 6 } }]]
7171
})
7272
```
7373

@@ -80,7 +80,7 @@ require('babel-core').transform('code', {
8080
'exclude': /node_modules/,
8181
'query': {
8282
'plugins': ['lodash'],
83-
'presets': [['env', { 'targets': { 'node': 4 } }]]
83+
'presets': [['@babel/env', { 'targets': { 'node': 6 } }]]
8484
}
8585
}]
8686
}

0 commit comments

Comments
 (0)