Gmousse / dataframe-js

No Maintenance Intended
https://gmousse.gitbooks.io/dataframe-js/
MIT License
460 stars 38 forks source link

[BUG] Please do not load core-js/promise polyfill in the package #95

Open chenxinyanc opened 5 years ago

chenxinyanc commented 5 years ago

Describe the bug Please remove the following line https://github.com/Gmousse/dataframe-js/blob/9d6226a62667b8882276bd190eb520086d57ee2e/lib/io.js#L9

Actually, I don't think it should ever be library's responsibility to set up polyfills. You may require user to install and configure them by themselves.

This package have hard dependency on core-js/promise polyfill. When used with Angular, we cannot ensure Promise polyfill is loaded before zone.js (a dependency of Angular) is loaded. Note that we are using separate js files and the js file using dataframe-js is loaded after the Angular app is loaded. Due to angular/zone.js#783 and zloirock/core-js#319, when core-js/promise module is loading, it will replace window.Promise from ZoneAwarePromise (patched by zone.js) back to native Promise, and breaks Angular's change detection.

To Reproduce Steps to reproduce the behavior:

Expected behavior

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Gmousse commented 5 years ago

Hi @chenxinyanc, Thank you for your report.

JS ecosystem can be an incredible mess sometimes. I will see to create a temporary workaround (I can't drop core-js just like that, or I will take one thousand issues). Stay tuned.

davir85 commented 5 years ago

I have the same issue. Any update?

Gmousse commented 5 years ago

Sorry I was in holidays, I will try to fix it monday.

Gmousse commented 4 years ago

Sorry for the delay, I wasn't active on github these days. I m working on a solution.