Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WeakMap error in IE11 #907

Closed
ViggoV opened this issue Jan 27, 2021 · 3 comments
Closed

WeakMap error in IE11 #907

ViggoV opened this issue Jan 27, 2021 · 3 comments

Comments

@ViggoV
Copy link

ViggoV commented Jan 27, 2021

Hi. I am getting the following error in IE11 when running my Webpack/Babel app:

Screen Shot 2021-01-27 at 09 18 10

IE's debugger points to line 37 of core-js/internals/collection.js. If I remove the core-js/stable import from my app, the next WeakMap occurence will throw the same error. It was my impression, however, that core-js was supposed polyfill WeakMap in IE

I am using:

  • core-js 3.8.3
  • webpack 5.9.0
  • @babel/core 7.12.9 (with /node_modules/ excluded)

I import 'core-js/stable as the first thing in my entry point.

I have tried the suggestion from Issue 485 with no luck.

@zloirock
Copy link
Owner

I'm not sure that it's a core-js issue - WeakMap#set should throw an error on primitive as a key. Please, add a reproducible example.

@ViggoV
Copy link
Author

ViggoV commented Jan 27, 2021

I threw this repo together: https://github.com/ViggoV/weakmap-error-repro

The error thrown is different, but it does throw on a core-js file mentioning WeakMaps. In any case, it is the only import used.

Thanks for your time

@ViggoV
Copy link
Author

ViggoV commented Feb 1, 2021

I solved my issue by reverting to the deprecated @babel/polyfill. I have tried a bunch of different configurations for Babel and Core-JS, but I was unable to replicate the behavior. It's probably rather a babel or webpack issue.

@ViggoV ViggoV closed this as completed Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants