Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 24, 2020
1 parent 5269afa commit b212474
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -15,6 +15,7 @@
- Added the missed `(es|stable)/instance/replace-all` entries
- Updated compat data mapping for Opera - from Opera 69, the difference with Chrome versions increased to 14
- Compat data mapping for modern Android WebView to Chrome moved from targets parser directly to compat data
- Depracate `core-js-builder` `blacklist` option in favor of `exclude`

##### 3.7.0 - 2020.11.06
- `String#replaceAll` moved to the stable ES, [per June TC39 meeting](https://github.com/tc39/notes/blob/master/meetings/2020-06/june-2.md#stringprototypereplaceall-for-stage-4)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -322,7 +322,7 @@ It does not work with some features. Also, if you change the default behaviour,

### Custom build[](#index)

For some cases could be useful adding a _exclude_ of features or generation a polyfill for target engines. You could use [`core-js-builder`](/packages/core-js-builder) package for that.
For some cases could be useful to exclude some `core-js` features or generate a polyfill for target engines. You could use [`core-js-builder`](/packages/core-js-builder) package for that.

### Compatibility data[](#index)

Expand Down
7 changes: 2 additions & 5 deletions packages/core-js-builder/README.md
@@ -1,12 +1,9 @@
For some cases could be useful adding a _exclude_ list of features or generation a polyfill for target engines. This API helps conditionally include or exclude certain parts of [`core-js`](https://github.com/zloirock/core-js), use `browserslist` queries from [`core-js-compat`](https://github.com/zloirock/core-js/tree/master/packages/core-js-compat) package.

> **NOTE:**
> `blacklist` parameter is now deprecated in favor of `exclude`. And will be removed in the next major version. You can't use both parameters since `blacklist` has precedence.
For some cases could be useful to exclude some `core-js` features or generate a polyfill for target engines. This API helps conditionally include or exclude certain parts of [`core-js`](https://github.com/zloirock/core-js), use `browserslist` queries from [`core-js-compat`](https://github.com/zloirock/core-js/tree/master/packages/core-js-compat) package.

```js
require('core-js-builder')({
modules: ['es', 'esnext.reflect', 'web'], // modules / namespaces, by default - all `core-js` modules
exclude: ['es.math', 'es.number.constructor'], // exclude of modules / namespaces, by default - empty list
exclude: ['es.math', 'es.number.constructor'], // a blacklist of modules / namespaces, by default - empty list
targets: '> 0.5%', // optional browserslist query
filename: './my-core-js-bundle.js', // optional target filename, if it's missed a file will not be created
}).then(code => { // code of result polyfill
Expand Down

0 comments on commit b212474

Please sign in to comment.