You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The "right" behavior here would be to either (a) just use setImmediate directly, and leave it up to the end user as to whether they want to use the polyfill, or (b) use a standalone setImmediate ponyfill instead of pulling in the entire core-js library.
The text was updated successfully, but these errors were encountered:
icopp
changed the title
jszip usage breaks on projects breaks for projects that use @babel/preset-env
jszip usage breaks for projects that use @babel/preset-env
Jan 15, 2019
jszip
uses arequire("core-js/library/fn/set-immediate")
statement at one point@babel/preset-env
and"useBuiltIns": "entry"
uses a custom-minified version ofcore-js
including only the polyfills needed to make the list of that project's supported browsers worksetImmediate
(because nothing in the bundle actually referencessetImmediate
as a global function)jszip
breaking, because it's trying to require something not in the bundleThe "right" behavior here would be to either (a) just use
setImmediate
directly, and leave it up to the end user as to whether they want to use the polyfill, or (b) use a standalonesetImmediate
ponyfill instead of pulling in the entirecore-js
library.The text was updated successfully, but these errors were encountered: