From d69ee278f721ebda43872a1fad11219c51c20556 Mon Sep 17 00:00:00 2001
From: breaddevil <breaddevil@gmail.com>
Date: Mon, 25 Jul 2016 20:40:26 +0200
Subject: [PATCH] update webpack css include path, allow files to be loaded
 from the project root node_modules folder. (#178)

---
 config/webpack.config.dev.js  | 3 ++-
 config/webpack.config.prod.js | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js
index 2a163eb4f..550309617 100644
--- a/config/webpack.config.dev.js
+++ b/config/webpack.config.dev.js
@@ -24,6 +24,7 @@ if (isInDebugMode) {
   relativePath = '../template';
 }
 var srcPath = path.resolve(__dirname, relativePath, 'src');
+var rootNodeModulesPath = path.resolve(__dirname, relativePath, 'node_modules');
 var nodeModulesPath = path.join(__dirname, '..', 'node_modules');
 var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html');
 var faviconPath = path.resolve(__dirname, relativePath, 'favicon.ico');
@@ -67,7 +68,7 @@ module.exports = {
       },
       {
         test: /\.css$/,
-        include: [srcPath, nodeModulesPath],
+        include: [srcPath, rootNodeModulesPath],
         loader: 'style!css!postcss'
       },
       {
diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js
index a5c52513f..89f50f764 100644
--- a/config/webpack.config.prod.js
+++ b/config/webpack.config.prod.js
@@ -23,6 +23,7 @@ if (process.argv[2] === '--debug-template') {
   relativePath = '../template';
 }
 var srcPath = path.resolve(__dirname, relativePath, 'src');
+var rootNodeModulesPath = path.resolve(__dirname, relativePath, 'node_modules');
 var nodeModulesPath = path.join(__dirname, '..', 'node_modules');
 var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html');
 var faviconPath = path.resolve(__dirname, relativePath, 'favicon.ico');
@@ -68,7 +69,7 @@ module.exports = {
       },
       {
         test: /\.css$/,
-        include: [srcPath, nodeModulesPath],
+        include: [srcPath, rootNodeModulesPath],
         // Disable autoprefixer in css-loader itself:
         // https://github.com/webpack/css-loader/issues/281
         // We already have it thanks to postcss.
-- 
GitLab