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
It would be nice if we could optionally avoid to polyfill Promise and window.fetch.
The latest versions of Firefox, Chrome and Opera natively support Promises and window.fetch, so it seems unnecessary. I recently started loading polyfills on demand with webpack in order to reduce the size of the main bundle.
I'm proposing the following structure
marty.js (or maybe marty-without-polyfills.js): equivalent to the current file, but without polyfills
polyfills.js: a file containing all polyfills
index.js (or maybe marty-with-polyfills.js): the entry point of the project with the old behavior
In this way it would be possible not to load polyfills by creating an alias.
With webpack:
If you clone it and run npm start you will notice that polyfills for fetch and Promise are loaded on demand.
For example, Safari 8 will request 2.bundle.js because it doesn't have a native window.fetch implementation.
It would be nice if we could optionally avoid to polyfill
Promise
andwindow.fetch
.The latest versions of Firefox, Chrome and Opera natively support Promises and
window.fetch
, so it seems unnecessary. I recently started loading polyfills on demand with webpack in order to reduce the size of the main bundle.I'm proposing the following structure
marty.js
(or maybemarty-without-polyfills.js
): equivalent to the current file, but without polyfillspolyfills.js
: a file containing all polyfillsindex.js
(or maybemarty-with-polyfills.js
): the entry point of the project with the old behaviorIn this way it would be possible not to load polyfills by creating an alias.
With webpack:
With browserify:
The text was updated successfully, but these errors were encountered: