-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Microsoft Edge 16-18 missing "flat" polyfill #11173
Comments
This was "solved" just a few days ago via 20c5467, but still is not working for us. Initially, we saw this error on next 9.3.0. We upgraded our deployed next version to 9.3.1-canary.4 and still see this issue. Then we upgraded to 9.3.1 and still see this issue. |
I've seen the same for our site. The problem is that Edge 16-18 doesn't support flat(Map), but has support for |
So is there an actual solution to the issue? rather than importing all the polyfills manually? (or just staying on a previous version of Next.js?) |
@martpie I've removed your comment because it causes severe performance regressions and should not be used under any circumstances. If you'd like to polyfill these manually, you should only import a |
@Timer I understand the motivation, but I disagree with it so I will just share my thoughts: Next.js has this built-in polyfilling system that the developer has no control over. Right now, this system is broken on one of the supported platform, so any application making use of ES6 feature will be broken on Edge, and this is a critical issue in my case. Now, the important bit: for me, the perfs cost of a one-line fix was less important than wasting time being sure I import only the polyfills I use through my code: my devs work in ES6 and they should not have to think every time they use a ES6 feature "oh do I have to include a polyfill for this method?". It's too much time wasted. Especially when you have an existing codebase: it makes no sense I read all my files and check all the ES features I use to be sure I only import the polyfills I should use. Hence the one-liner.
Yes, it adds a 20 kilobytes, the comment was explicit about it, that's why I thought it was an ok solution. Basically, bad solution over no solution, but if you believe otherwise, this is fine. |
It adds over 20kb gzipped:
This is a ton of JavaScript which prevents your app from bootstrapping. If you're OK with the performance degradation in your app, that's fine. Your example also used the pattern from with-polyfills which has a warning that it can prevent your application from hydrating.
It'd be great if you could send a PR to Next.js that fixes this specific missing polyfill. |
as @alexanbj said:
it's not about one missing polyfill, it's about all the polyfills missing on Edge 😄(If I understood the bug correctly). I may have time to submit a PR this week, but it feels much bigger than just "add an import for a missing polyfill". Or I misunderstood something. |
There's a small uncanny valley of features that are missing in Edge versions that support |
Thanks for the tip 👍 I'll have a look and open a PR this week |
I opened something here: |
This is fixed in the latest Next.js canary version. |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
When loading out Next site with Edge 18, there is a critical
TypeError
statingObject doesn't support property or method 'flat'
To Reproduce
Expected behavior
This page should load properly like all other browsers were able to
Screenshots
System information
Additional context
This issue may relate to the recent changes in Next's polyfilling partially described in #7993
I looked into adding this flat polyfill manually, but it's already included in
next-polyfill-nomodule
asimport 'core-js/features/array/flat'
We have zero polyfilling in our application currently, we're fully relying on Next's included polyfills. We have not changed the included version of
core-js
This is a private project, we can email a zip to anyone at Zeit, just let me know if this looks like a valid bug to you all
The text was updated successfully, but these errors were encountered: