-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
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 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 behavior
In this way it would be possible not to load polyfills by creating an alias.
With webpack:
module.exports = {
// ...
resolve: {
alias: {
'marty': 'marty/marty-without-polyfills.js'
}
}
};
With browserify:
browserify --require marty:marty/marty-without-polyfills.js
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels