Skip to content

Commit

Permalink
Pass down moduleName to polyfill-regenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Mar 8, 2024
1 parent 5c306b9 commit 1cf0410
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Expand Up @@ -30,7 +30,7 @@ function createRegeneratorPlugin(options, useRuntimeRegenerator, corejsPlugin) {
}

module.exports = function createBasePolyfillsPlugin(
{ corejs, regenerator = true },
{ corejs, regenerator = true, moduleName },
runtimeVersion,
absoluteImports,
) {
Expand Down Expand Up @@ -70,7 +70,12 @@ module.exports = function createBasePolyfillsPlugin(
method: "usage-pure",
absoluteImports,
proposals,
[pluginsCompat]: { useBabelRuntime: true, runtimeVersion, ext: "" },
[pluginsCompat]: {
useBabelRuntime: true,
runtimeVersion,
ext: "",
moduleName,
},
};

return createRegeneratorPlugin(
Expand Down
@@ -1,2 +1,2 @@
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
import _regeneratorRuntime from "@babel/runtime/regenerator";
_regeneratorRuntime.mark(function () {});

0 comments on commit 1cf0410

Please sign in to comment.