@babel/runtime 7.13.10 breaking on JSPM #13059
Labels
i: bug
i: needs triage
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Bug Report
Current behavior
Input Code
Loading
@babel/runtime@7.13.10/helpers/interopRequireWildcard.js
includes arequire
to@babel/runtime/helpers/typeof
which is mapped to resolve to@babel/runtime@7.13.10/helpers/esm/typeof.js
in all environments that aren't Node.js environments by the exports definitions.This file then also uses the import pattern:
Where accessing the
default
off of thehelpers/esm/typeof.js
file makes_typeof
undefined.Expected behavior
"require"
should not remap to an ESM module, or if it does the interop should take into account the varying signature of the exports.Possible Solution
I'm not sure what would be best actually. Ideally using relative paths in the first place would avoid this. Alternatively using the
"require"
condition instead of the"node"
condition. If it is really desired to replace the CJS require statements with ES modules then the Webpack / build-tool-specific"module"
condition could be used.The text was updated successfully, but these errors were encountered: