You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add require("regenerator-runtime"), which defines the global regeneratorRuntime variable so that it can be used
Use @babel/plugin-transform-runtime to inject the necessary @babel/runtime imports
Update @babel/core and @babel/plugin-transform-regenerator to ^7.18.0, so that the compiled output doesn't rely on a regeneratorRuntime global anymore.
Surprisingly, the ESM build already follows the 2nd solution and thus isn't affected by this bug. You can see at line 316 of https://unpkg.com/browse/[email protected]/dist/index.esm.js that it uses the local_regeneratorRuntime variable, imported at line 17.
I tried understanding your build process and this might be a bug with https://github.com/umijs/father, but I cannot find where it's configured for this repository 😅
What happens?
(cross-posting from babel/babel#14568 (comment))
At line 445 of https://unpkg.com/browse/[email protected]/dist/index.js,
dva-core
uses theregeneratorRuntime
global (which is injected by Babel). However, that global variable is not defined anywhere.There are three possible fixes:
require("regenerator-runtime")
, which defines the globalregeneratorRuntime
variable so that it can be used@babel/plugin-transform-runtime
to inject the necessary@babel/runtime
imports@babel/core
and@babel/plugin-transform-regenerator
to ^7.18.0, so that the compiled output doesn't rely on aregeneratorRuntime
global anymore.Surprisingly, the ESM build already follows the 2nd solution and thus isn't affected by this bug. You can see at line 316 of https://unpkg.com/browse/[email protected]/dist/index.esm.js that it uses the local
_regeneratorRuntime
variable, imported at line 17.Mini Showcase Repository(REQUIRED)
babel/babel#14568 (comment)
Context
The text was updated successfully, but these errors were encountered: