theKashey/use-sidecar

Requires global Promise polyfill (breaks ie11)

Opened this issue · 1 comments

Problem

This library assumes there is a global Promise object available. As such, it breaks in IE11.

Expected

Should just work in IE11

Actual

Breaks with 'Promise' is undefined error.

Solution

Include Promise polyfill (or document the need to provide global Promise polyfill in order to use this library)

Example Code (not sure how many other places this is an issue)

const cycle = () => Promise.resolve().then(executeQueue);

Any code splitting will end up using Promise. I mean webpack(for example) will use it to load stuff once your chunk will have dependencies.

Screen Shot 2020-03-16 at 6 42 50 pm

You just should always have it. Just Always. No extra documentation is needed when the majority of the world is going to drop IE11 support this quarter.