Skip to content

Commit

Permalink
update the actual minor core-js version in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 22, 2020
1 parent 2fc3915 commit 810858e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ import 'regenerator-runtime/runtime';

#### `@babel/preset-env`[](#index)

[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes working with global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to used version of `core-js`, like `corejs: '3.6'`.
[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes working with global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to used version of `core-js`, like `corejs: '3.7'`.

> **Warning!** Recommended to specify used minor `core-js` version, like `corejs: '3.6'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases.
> **Warning!** Recommended to specify used minor `core-js` version, like `corejs: '3.7'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases.
- `useBuiltIns: 'entry'` replaces imports of `core-js` to import only required for a target environment modules. So, for example,
```js
Expand Down Expand Up @@ -270,7 +270,7 @@ import 'core-js/modules/es.array.of';
var array = Array.of(1, 2, 3);
```

By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by `proposals` option, as `corejs: { version: '3.6', proposals: true }`.
By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by `proposals` option, as `corejs: { version: '3.7', proposals: true }`.

#### `@babel/runtime`[](#index)

Expand Down

0 comments on commit 810858e

Please sign in to comment.