Skip to content

Commit

Permalink
Remove promise and fetch polyfills from browser build
Browse files Browse the repository at this point in the history
Reduces bundle size by 23%
Only IE needs polyfilling these days, and there has always been warnings in the readme about required polyfills
  • Loading branch information
cookpete committed Oct 3, 2017
1 parent 868bbb3 commit a33238c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"codecov": "^2.3.0",
"cross-env": "^5.0.1",
"css-loader": "^0.28.0",
"es6-promise": "^4.0.3",
"exports-loader": "^0.6.3",
"extract-text-webpack-plugin": "^3.0.0",
"html-webpack-plugin": "^2.30.1",
Expand Down
9 changes: 1 addition & 8 deletions webpack.browser.babel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import path from 'path'
import webpack from 'webpack'
import config, { minifyPlugins } from './webpack.production.babel'

export default {
Expand All @@ -24,11 +23,5 @@ export default {
}
]
},
plugins: [
new webpack.ProvidePlugin({
'Promise': 'exports-loader?global.Promise!es6-promise',
'window.fetch': 'exports-loader?self.fetch!whatwg-fetch'
}),
...minifyPlugins
]
plugins: minifyPlugins
}
4 changes: 0 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2276,10 +2276,6 @@ es6-map@^0.1.3:
es6-symbol "~3.1.1"
event-emitter "~0.3.5"

es6-promise@^4.0.3:
version "4.1.1"
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a"

es6-set@~0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1"
Expand Down

0 comments on commit a33238c

Please sign in to comment.