From 853f2dab503ed9ddbcb9e2673ae6bc4ad9fd179f Mon Sep 17 00:00:00 2001
From: Marshall Quander <marshall@quander.me>
Date: Tue, 17 Jul 2018 16:07:12 -0700
Subject: [PATCH] Fix error logging in naf-janus-adapter

---
 package.json      | 2 +-
 webpack.config.js | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 24fb65143..e001174a0 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
   },
   "scripts": {
     "postinstall": "node ./scripts/postinstall.js",
-    "start": "cross-env NODE_ENV=development webpack-dev-server",
+    "start": "cross-env NODE_ENV=development webpack-dev-server --mode=production",
     "build": "rimraf ./public && cross-env NODE_ENV=production webpack --mode=production",
     "doc": "node ./scripts/doc/build.js",
     "prettier": "prettier --write '*.js' 'src/**/*.js'",
diff --git a/webpack.config.js b/webpack.config.js
index 5f688d9bf..454da0204 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -8,6 +8,7 @@ const webpack = require("webpack");
 const HTMLWebpackPlugin = require("html-webpack-plugin");
 const ExtractTextPlugin = require("extract-text-webpack-plugin");
 const CopyWebpackPlugin = require("copy-webpack-plugin");
+const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
 const _ = require("lodash");
 
 const SMOKE_PREFIX = "smoke-";
@@ -195,6 +196,10 @@ const config = {
       }
     ]
   },
+  // necessary due to https://github.com/visionmedia/debug/issues/547
+  optimization: {
+    minimizer: [new UglifyJsPlugin({ uglifyOptions: { compress: { collapse_vars: false } } })]
+  },
   plugins: [
     // Each output page needs a HTMLWebpackPlugin entry
     new HTMLWebpackPlugin({
-- 
GitLab