From a16b5943cbc09d61bff62bf0ac0f43ef3fb53e5b Mon Sep 17 00:00:00 2001
From: Raul Glogovetan <raul@glogovetan.com>
Date: Mon, 8 Oct 2018 21:55:20 +0300
Subject: [PATCH] Fix: webpack devserver build bug

Related to importing/parsing XMLHttpRequest

See: https://github.com/webpack/webpack-dev-server/issues/66
---
 webpack.config.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/webpack.config.js b/webpack.config.js
index 3176c79579..ba0a840662 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -104,6 +104,15 @@ const config = {
     contentBase: [path.resolve(__dirname, '..', 'colonyNetwork', 'build')],
     hotOnly: true,
   },
+  /*
+   * Fix for the XMLHttpRequest compile-time bug.
+   *
+   * See for more details:
+   * https://github.com/webpack/webpack-dev-server/issues/66
+   */
+  externals:[{
+    xmlhttprequest: '{XMLHttpRequest:XMLHttpRequest}',
+  }],
 };
 
 module.exports = () => config;