While it isn't technically needed because regenerator already handles
async functions, it doesn't play well with the Promise detection logic
used by @babel/preset-env's useBuiltIns and @babel/transform-runtime.
The plugin exclusion logic isn't removed, because
1) it will be useful when merging @babel/preset-modules
into @babel/preset-env
2) if/when regenerator will support injecting a custom promise,
we can enable this optimization again
@babel/plugin-transform-regenerator
Explode async and generator functions into a state machine.
See our website @babel/plugin-transform-regenerator for more information.
Install
Using npm:
npm install --save-dev @babel/plugin-transform-regenerator
or using yarn:
yarn add @babel/plugin-transform-regenerator --dev