use babel-plugin-transform-runtime for generator function support #169
Labels
kind: feature
New feature or request
solution: workaround available
There is a workaround available for this issue
Milestone
Current Behavior
Right now, when using generator functions, a global import of regenerator-runtime is required, which means that either the library consuming project has to import it itself, or that the library has to import it (which can cause problems due to different versions of the regenerator-runtime being possibly imported.
Desired Behavior
The library should use its own version of the regenerator-runtime without polluting the global namespace.
Suggested Solution
https://babeljs.io/docs/en/babel-plugin-transform-runtime
Using that plugin with regenerator set to true + including regenerator-runtime as dependency should ensure that the regenerator runtime is not using a global namespace and can be imported by the own library without problems.
Who does this impact? Who is this for?
Libraries that make use of generator functions.
The text was updated successfully, but these errors were encountered: