Commit d69ee278 authored by breaddevil's avatar breaddevil Committed by Dan Abramov
Browse files

update webpack css include path, allow files to be loaded from the project...

update webpack css include path, allow files to be loaded from the project root node_modules folder. (#178)
parent 90d49f83
No related merge requests found
Showing with 4 additions and 2 deletions
+4 -2
......@@ -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'
},
{
......
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment