question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Suggestion: a polyfill free version?

See original GitHub issue

Hi @garronej,

First of all Iā€™d like to thank you for all the work youā€™ve put into this. Iā€™ve been using this library from the start and itā€™s pretty much the thing that made migration to MUI v5 possible for me. The amount of work and love youā€™ve put into this is inspiring, so thank you very much!

I had previously opened an issue here with regards to an error I was having with the fromEntries polyfill included in this lib (specifically on ie11). Long story short the polyfill included here requires Symbol.Iterator, which does come with recommended ie11 polyfills for react apps. Our project doesnā€™t use those, we instead use the polyfill.io service which allows us to reduce bundle size and also move polyfill dependencies elsewhere. For reference, we ended up including the Object.fromEntries polyfill from there which doesnā€™t have other polyfill dependencies (https://github.com/Financial-Times/polyfill-library/blob/master/polyfills/Object/fromEntries/polyfill.js).

Recently with further upgrades weā€™ve also had to include Array.find and Proxy, the latter one being slightly harder as itā€™s not really included in any of the major polyfill providers, so it requires that specific package which you linked. Proxy, specifically, is a problem not just in ie11, but in several older browsers, which we started to see errors for in our logs. I know itā€™s all in your README and adding the required polyfills is not particularly hard, but specifically in our case since we run automatic dependency upgrading in our pipelines we tend to see these issues come up in production, even if it only impacts a small percentage of users.

So my suggestion would be if there is a possibility of having a version that doesnā€™t require any of these polyfills. I havenā€™t looked into the code to see what Proxy or Array.find is doing, and if there are other ways to do the same thing, so please excuse my request if it doesnā€™t make any sense. I just thought Iā€™d put the suggestion out there since, for example, even though MUI v5 itself doesnā€™t support ie11 and older browsers, it does actually work on them bar some stying issues or other very specific problems.

Again, please ignore if this doesnā€™t make any sense, and thank you for the great work.

Fernando

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
thenanocommented, Dec 19, 2021

That is absolutely perfect, thank you so much! We donā€™t use the nested selector api anyways so this is perfect for us. Thanks again, I canā€™t believe how quickly you sorted this out!

0reactions
garronejcommented, Dec 19, 2021

Glad it do it for you!
My secret is I use ts-ci šŸ¤«

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 of the best polyfills - Creative Bloq
A rare commercial polyfill, it comes in a paid 'pro' version, as well as a free version, which just lacks a few advanced...
Read more >
How to Polyfill node core modules in webpack 5
This is because NodeJS polyfills are not included in the latest version of create-react-app. Solution: Install react-app-rewired and the missingĀ ...
Read more >
mfranzke/datalist-polyfill: Minimal and dependency ... - GitHub
This is a minimal and dependency-free vanilla JavaScript polyfill for the awesome datalist-functionality, that will bring joy and happiness into our lives :-)....
Read more >
A polyfill for button type=ā€shareā€ | by Jeremy Keith | Medium
The polyfill doesn't support Internet Explorer 11 or lower because it uses the DOM closest() method. Feel free to fork and rewrite if...
Read more >
Debounce ā€“ How to Delay a Function in JavaScript (JS ES6 ...
In JavaScript, a debounce function makes sure that your code is only triggered once per user input. Search box suggestions, text-fieldĀ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found