Closed andyo729 closed 6 years ago
So, if I use Promise.prototype.finally
in the polyfills array it appears to work. Might just be a matter of updating your docs.
You are right, there is a problem with the Promise
polyfill. But simply using Promise.prototype.finally
is not the correct solution, because that actually is a different polyfill (that one only contains the finally
method and expects then
and catch
to be implemented by the browser. The Promise
polyfill provides all three methods.)
Polyfill-service used to have a file at polyfill-service/polyfills/Promise/polyfill.js
, this is the file which my injector package tries to load. But the file has been removed in later versions of polyfill-sevice
.
It looks like they now also reference polyfills from external packages, i.e. the Promise
polyfill can actually be found at node_modules/yaku/dist/yaku.browser.global.min.js
.
The solution for this issue here will be to edit this line such that:
polyfill.js
file exists, if so then simply use itconfig.json
file and do whatever is specified in the install
section to obtain the polyfill (see documentation)I guess I'll have time to work on this next weekend.
There was actually a very simple solution to this problem: polyfill-service
uses a postinstall
script that compiles all polyfills to polyfill-service/polyfills/__dist/
. So we can just take the files from there...
When I include support for
Promise
I get an error that the module cannot be found. I checked outpolyfill-service
and it appears that it is pointed to the wrong path. For example,Promise
should go to: 'polyfill-service/polyfills/Promise/prototype/finally/polyfill'.