Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.

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

Open
chenxinyanc opened this issue Aug 13, 2019 · 4 comments
Open
Assignees
Labels

Comments

@chenxinyanc
Copy link

Describe the bug
Please remove the following line

require("core-js/modules/es.promise");

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):

  • OS: Windows
  • Browser: Chrominum Edge
  • Version: Dev 77.0.235.5

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

@Gmousse Gmousse self-assigned this Aug 13, 2019
@Gmousse
Copy link
Owner

Gmousse commented Aug 13, 2019

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
Copy link

davir85 commented Aug 30, 2019

I have the same issue. Any update?

@Gmousse
Copy link
Owner

Gmousse commented Aug 31, 2019

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

@Gmousse
Copy link
Owner

Gmousse commented Nov 23, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants