-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
@babel/runtime 7.13.10 breaking on JSPM #13059
Description
Bug Report
- I would like to work on a fix!
Current behavior
- REPL, https://jspm.org/sandbox#H4sIAAAAAAAAA7WabVPbOBDH3/dTqLk3vTtsE1r6QEMnNOU6cEA5Hsr03in2JlaxLSPJPN3cd7+V5aSJsURU5mZaIPZ/f7uSVytZyuB5wmN1VwJJVZ59eDaY/QKafHhGyCAHRUmcUiFBbfcqNQne9uobiqkMPpwAjRU5VVQoEIPIXJzbFTSH7d41g5uSC9UjMS8UFMi5YYlKtxO4ZjEE9Yc1wgqmGM0CGdMMtvvoZRCZMAZjntzV1OdBQHZPySFPqgzIacpyuUX2ck0nOS0lKXl2N2FZRiZckLyWSTIW/EaCkOSGqZRXirAFC1mV9YcXFK3gNoZSkVEqeA7k7bvffyVBUHuWsWB4h8q7IiZSxNu9VKlSbkXRlIbfZZmHjEdFmW+BDIzfQOrwhuthH/9FCZMqat0Lc1agbe/DIDJ47alpJv4iZP/0+JB8hgIEVdiepqGHtKzv7iZMkfOTgy0yD2UmnUf0y/nG1+m3zx8vP+2WR2ejzZPRaHP/YFTuH1zs8TPZP7ofXe+fHX1T98lfakdevvr85fLv1yjfOczg9fGl2NlBX8t9oNNlu2f6ELuwTod/6oiai7K31VzASxJyWigWBxULhM4WvGnruwfa4Ua4Hr40nRfzPOfFdxmxIoFb3W+1i3/XjGsZ8xKWPHc4WbiNguGYjiGLRIU+c8Bky0rMkohKTBZ1ljK5Z1KS3UPiiHoZM3wT9l/iM3fjdPhrj0YSYycoGGWI+Hn/C5DVvMItDtLkCR4bwGreWJGCYEoecC7h530uYVb1jDWLlydwVTEBn2BCq8yVnY9G0IH7mUguWJbEVDwh5bp5q8XCx98hVhemUh4jBZOXwVMfj4u6Wly66vDJE5JS5g2j7W+SVTgpVSyqS06AdabkBV4J4Fr/zLD46Lrqcr0iAieDzX74plXPcBoM5zVtpcAE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00sP4pVY3s4Vv+nQJ7Nfur/7RPqpaNgc6ZdnwOT2dn6b4RKMtukP2fmewITwfOuE+H3hkpIFJELwRSQHN/+mvN7EvMESAoC1ggXGksRjGOXom7CUKArKV7sSRH3CFU4A40rvMcLolKYUUzEYe0m5oXkGYQZn75oxfjr+6XWDiLz3YNBZL4Y8R9etTaaMCEAAA==
Input Code
Loading @babel/[email protected]/helpers/interopRequireWildcard.js includes a require to @babel/runtime/helpers/typeof which is mapped to resolve to @babel/[email protected]/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:
var _typeof = require("@babel/runtime/helpers/typeof")["default"];Where accessing the default off of the helpers/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.