From 0f1e4fc5bd0ec9e2cc4e9f77da425d6234e6ddbc Mon Sep 17 00:00:00 2001
From: Jishnu Mohan <jishnu7@gmail.com>
Date: Sat, 2 Dec 2017 13:01:07 +0530
Subject: [PATCH] Updating webpack to v3.x

---
 package.json      | 8 ++++----
 webpack.config.js | 7 +++----
 2 files changed, 7 insertions(+), 8 deletions(-)

--- a/package.json
+++ b/package.json
@@ -39,7 +39,7 @@
     "grunt-cli": "^1.2.0",
     "grunt-contrib-clean": "^1.0.0",
     "grunt-contrib-nodeunit": "^1.0.0",
-    "grunt-webpack": "^1.0.18",
+    "grunt-webpack": "^3.0.2",
     "istanbul-instrumenter-loader": "^1.0.0",
     "jasmine-core": "^2.4.1",
     "karma": "^1.3.0",
@@ -59,10 +59,10 @@
     "minimist": "^1.2.0",
     "phantomjs-prebuilt": "^2.1.7",
     "sinon": "^1.17.4",
-    "webpack": "^1.13.1",
-    "webpack-dev-server": "^1.14.1",
+    "typescript": "^2.0.3",
     "url-search-params": "^0.6.1",
-    "typescript": "^2.0.3"
+    "webpack": "^3.9.1",
+    "webpack-dev-server": "^2.9.5"
   },
   "browser": {
     "./lib/adapters/http.js": "./lib/adapters/xhr.js"
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,4 +1,5 @@
 var webpack = require('webpack');
+var path = require('path');
 var config = {};
 
 function generateConfig(name) {
@@ -6,7 +7,7 @@
   var config = {
     entry: './index.js',
     output: {
-      path: 'dist/',
+      path: path.resolve(__dirname, 'dist/'),
       filename: name + '.js',
       sourceMapFilename: name + '.map',
       library: 'axios',
@@ -15,7 +16,15 @@
     node: {
       process: false
     },
-    devtool: 'source-map'
+    devtool: 'source-map',
+
+    resolve: {
+      modules: ['/usr/lib/nodejs'],
+    },
+
+    resolveLoader: {
+      modules: ['/usr/lib/nodejs'],
+    }
   };
 
   config.plugins = [
@@ -27,9 +36,7 @@
   if (uglify) {
     config.plugins.push(
       new webpack.optimize.UglifyJsPlugin({
-        compressor: {
-          warnings: false
-        }
+        sourceMap: true
       })
     );
   }
