Closed mjss closed 6 years ago
It sounds like https://github.com/theKashey/vue-focus-lock/issues/3
Probably adding polyfill is the best way to mitigate this, as long those 2 commands are very popular (it's a babel helper _toConsumableArray
), and sooner or later you will include some library with the same requirements.
I will try to do something, just when get some free time. But I have to idea when.
@theKashey Thank you for your reply!
I agree this is a common problem. We are using this module in a vue component library. I don't want to import a polyfill module like babel-polyfill because it will increase the bundle size.
And yes now I am adding individual polyfill for Array.from
and Array.find
(plus fix focus-lock version in package.json) to mitigate this issue. But it will be best if this module can natively support ES5.
I'll take a look. PS: You shall not include any polyfills if you are a library.
What problem does this feature solve?
When using this module, it requires some polyfills (like
Array.from
andArray.find
) to work on old browsers like IE. As a low level module, I think it will be nice to provide compatibility to ES5 out of the box, so that the user doesn't need to worry about polyfills.