core-js: Test error after upgrading to corejs 3
After using {corejs: 3} option for both @babel/preset-env and @babel/plugin-transform-runtime, and using @babel/runtime-corejs3, my tests are failing with the following error:
/node_modules/core-js-pure/internals/well-known-symbol.js:10
return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]
^
TypeError: Cannot read property 'iterator' of undefined
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (9 by maintainers)
You should you
corejs: 3in@babel/preset-envOR in@babel/plugin-transform-runtime, but not together.@nicolo-ribaudo already answered to this question.
Interesting. So, seems you use mocked
windowand, because ofwindow.Math === Math, it passes current global object detection. But it’s not a real global object, so you try to usecore-jsin a broken environment. You should usecore-jsbefore that. Seems the issue resolved.Ok, let say in other words: you should use
useBuiltInsoption ofpreset-envORcorejsoption ofruntime, but not together.