|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
479 bytes
|
| Line | |
|---|
| 1 | # babel-plugin-polyfill-corejs2
|
|---|
| 2 |
|
|---|
| 3 | ## Install
|
|---|
| 4 |
|
|---|
| 5 | Using npm:
|
|---|
| 6 |
|
|---|
| 7 | ```sh
|
|---|
| 8 | npm install --save-dev babel-plugin-polyfill-corejs2
|
|---|
| 9 | ```
|
|---|
| 10 |
|
|---|
| 11 | or using yarn:
|
|---|
| 12 |
|
|---|
| 13 | ```sh
|
|---|
| 14 | yarn add babel-plugin-polyfill-corejs2 --dev
|
|---|
| 15 | ```
|
|---|
| 16 |
|
|---|
| 17 | ## Usage
|
|---|
| 18 |
|
|---|
| 19 | Add this plugin to your Babel configuration:
|
|---|
| 20 |
|
|---|
| 21 | ```json
|
|---|
| 22 | {
|
|---|
| 23 | "plugins": [["polyfill-corejs2", { "method": "usage-global" }]]
|
|---|
| 24 | }
|
|---|
| 25 | ```
|
|---|
| 26 |
|
|---|
| 27 | This package supports the `usage-pure`, `usage-global`, and `entry-global` methods.
|
|---|
| 28 | When `entry-global` is used, it replaces imports to `core-js`.
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.