Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of JSZip breaks on projects breaks for projects that use @babel/preset-env #724

Closed
icopp opened this issue Jan 15, 2019 · 0 comments
Closed
Labels

Comments

@icopp
Copy link

icopp commented Jan 15, 2019

  • jszip uses a require("core-js/library/fn/set-immediate") statement at one point
  • A Babel build with @babel/preset-env and "useBuiltIns": "entry" uses a custom-minified version of core-js including only the polyfills needed to make the list of that project's supported browsers work
  • The resulting bundle doesn't include setImmediate (because nothing in the bundle actually references setImmediate as a global function)
  • ...which leads to jszip breaking, because it's trying to require something not in the bundle
  • ...which leads to exceljs breaking the first time it tries to use jszip

The "right" behavior here would be for jszip to stop trying to directly include polyfills (and leave that up to the end user like it should), but since that project is effectively unmaintained at this point, any practical bugfixes will have to come from other projects switching away from using it.

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

No branches or pull requests

2 participants