diff --git a/package.json b/package.json index 87dd39f..b5f5be0 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,14 @@ "author": "Berkay Yildiz", "license": "ISC", "dependencies": { + "exports-loader": "^0.6.2", + "imports-loader": "^0.6.5", "react": "^0.14.0", "react-dom": "^0.14.0", "react-redux": "^3.1.0", "redux": "^3.0.2", - "redux-thunk": "^1.0.0" + "redux-thunk": "^1.0.0", + "whatwg-fetch": "^0.10.0" }, "devDependencies": { "babel-core": "^5.8.25", @@ -26,7 +29,7 @@ "webpack": "^1.12.2", "webpack-dev-server": "^1.12.0" }, - "babel":{ + "babel": { "stage": 0 } } diff --git a/webpack.config.js b/webpack.config.js index b99715a..756ed0a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,5 @@ var path = require('path'); +var webpack = require('webpack'); module.exports = { entry: [ @@ -22,6 +23,11 @@ module.exports = { } ] }, + plugins: [ + new webpack.ProvidePlugin({ + 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch' + }) + ], resolve: { extensions: ['', '.js', '.json'] }