From ce9fdca52425ba2a1cc8d87848bccd878bab33b6 Mon Sep 17 00:00:00 2001
From: Max <contact@mstoiber.com>
Date: Thu, 21 Jul 2016 21:57:10 +0200
Subject: [PATCH] Fix webpack config

---
 config/webpack.config.dev.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js
index 40aec9d87..4dfd587eb 100644
--- a/config/webpack.config.dev.js
+++ b/config/webpack.config.dev.js
@@ -12,12 +12,16 @@ var autoprefixer = require('autoprefixer');
 var webpack = require('webpack');
 var HtmlWebpackPlugin = require('html-webpack-plugin');
 
+function isInDebugMode() {
+  return process.argv.some(function (item) { return item.indexOf('--debug-template') > -1 });
+}
+
 // TODO: hide this behind a flag and eliminate dead code on eject.
 // This shouldn't be exposed to the user.
 var isInNodeModules = 'node_modules' ===
   path.basename(path.resolve(path.join(__dirname, '..', '..')));
 var relativePath = isInNodeModules ? '../../..' : '..';
-if (process.argv[2] === '--debug-template') {
+if (isInDebugMode()) {
   relativePath = '../template';
 }
 var srcPath = path.resolve(__dirname, relativePath, 'src');
-- 
GitLab