Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This makes sure that even if the target bundler doesn't support export conditions in `package.json`, an ESM helper will only load other ESM helpers.
- Loading branch information
1 parent
a2ed7aa
commit 8b20b01
Showing
6 changed files
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...transform-runtime/test/fixtures/dual-babel-runtime/useESModules-modern-runtime/stderr.txt
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
packages/babel-runtime-corejs2/helpers/temporalRef/_index.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import undef from "@babel/runtime-corejs2/helpers/temporalUndefined"; | ||
import err from "@babel/runtime-corejs2/helpers/tdz"; | ||
import undef from "../temporalUndefined/_index.mjs"; | ||
import err from "../tdz/_index.mjs"; | ||
export default function _temporalRef(val, name) { | ||
return val === undef ? err(name) : val; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import arrayWithHoles from "@babel/runtime-corejs2/helpers/arrayWithHoles"; | ||
import iterableToArray from "@babel/runtime-corejs2/helpers/iterableToArray"; | ||
import unsupportedIterableToArray from "@babel/runtime-corejs2/helpers/unsupportedIterableToArray"; | ||
import nonIterableRest from "@babel/runtime-corejs2/helpers/nonIterableRest"; | ||
import arrayWithHoles from "../arrayWithHoles/_index.mjs"; | ||
import iterableToArray from "../iterableToArray/_index.mjs"; | ||
import unsupportedIterableToArray from "../unsupportedIterableToArray/_index.mjs"; | ||
import nonIterableRest from "../nonIterableRest/_index.mjs"; | ||
export default function _toArray(arr) { | ||
return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import undef from "@babel/runtime/helpers/temporalUndefined"; | ||
import err from "@babel/runtime/helpers/tdz"; | ||
import undef from "../temporalUndefined/_index.mjs"; | ||
import err from "../tdz/_index.mjs"; | ||
export default function _temporalRef(val, name) { | ||
return val === undef ? err(name) : val; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import arrayWithHoles from "@babel/runtime/helpers/arrayWithHoles"; | ||
import iterableToArray from "@babel/runtime/helpers/iterableToArray"; | ||
import unsupportedIterableToArray from "@babel/runtime/helpers/unsupportedIterableToArray"; | ||
import nonIterableRest from "@babel/runtime/helpers/nonIterableRest"; | ||
import arrayWithHoles from "../arrayWithHoles/_index.mjs"; | ||
import iterableToArray from "../iterableToArray/_index.mjs"; | ||
import unsupportedIterableToArray from "../unsupportedIterableToArray/_index.mjs"; | ||
import nonIterableRest from "../nonIterableRest/_index.mjs"; | ||
export default function _toArray(arr) { | ||
return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest(); | ||
} |