Skip to content

Commit

Permalink
Updates @babel/plugin-syntax-dynamic-import core-js module paths (cor…
Browse files Browse the repository at this point in the history
…e-js@3)

- Adds core-js@3 plugin path varients to documentation.
  • Loading branch information
jbottigliero authored May 24, 2019
1 parent f7add8a commit 874b3aa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/plugin-syntax-dynamic-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ Currently, `@babel/preset-env` is unaware that using `import()` with [Webpack re
// webpack config
const config = {
entry: [
// using core-js@2
"core-js/modules/es.promise",
"core-js/modules/es.array.iterator",
// or using core-js@3
"core-js/stable/promise",
"core-js/stable/array/iterator",
path.resolve(__dirname, "src/main.js"),
],
// ...
Expand All @@ -55,9 +59,13 @@ const config = {
or

```js
// src/main.js
// core-js@2 src/main.js
import "core-js/modules/es.promise";
import "core-js/modules/es.array.iterator";

// core-js@3 src/main.js
import "core-js/stable/promise";
import "core-js/table/array/iterator";

// ...
```

0 comments on commit 874b3aa

Please sign in to comment.