Commit 794e5ad
committed
test: compatible targets shouldn't insert regeneratorRuntime
- specifically, this checks that `--target node`, which targets Node 10
right now, does not output regeneratorRuntime as generators have
native support there (as does async/await)
- remove `targets` from `polyfill-regenerator` config because it's
actually not necessary for this specific polyfill
- it only inserts regenerator if a `regeneratorRuntime` global is
detected, which is only inserted by
`@babel/plugin-transform-generator` if the `targets` require it
- meaning that for this particular polyfill, `preset-env`'s
`targets` are sufficient1 parent 814c83b commit 794e5ad
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
| |||
0 commit comments