window.fetch polyfill

This commit is contained in:
SleepWalker
2016-02-13 11:06:17 +02:00
parent e2598883f7
commit 19eec8f7a4
2 changed files with 9 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ var webpackConfig = {
app: path.join(__dirname, 'src'),
vendor: [
'babel-polyfill',
'whatwg-fetch',
'classnames',
'history',
'intl-format-cache',
@@ -111,6 +112,10 @@ var webpackConfig = {
minify: {
collapseWhitespace: isProduction
}
}),
new webpack.ProvidePlugin({
// window.fetch polyfill
fetch: 'imports?this=>self!exports?self.fetch!whatwg-fetch'
})
].concat(isTest ? [] : [
new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js')