log embed errors

This commit is contained in:
Sérgio Ramos 2016-10-26 14:03:23 +01:00
parent d2124638ba
commit c182bc2e76
2 changed files with 4 additions and 5 deletions

View File

@ -19,9 +19,7 @@ const plugins = {
require('postcss-cssnext')() require('postcss-cssnext')()
] ]
}, },
'embed-markdown-loader': { 'embed-markdown-loader': {}
mode: 'plain'
}
} }
}) })
}; };

View File

@ -67,13 +67,14 @@ module.exports = ({
compiler.run((err, stats) => { compiler.run((err, stats) => {
if (err) { if (err) {
return fn(err); return fn(err, {});
} }
const errors = stats.toJson().errors; const errors = stats.toJson().errors;
if (errors && errors.length) { if (errors && errors.length) {
return fn(errors); errors.map(err => console.log(err));
return fn(errors, {});
} }
mfs.readFile(`/static/${name}`, (err, res) => { mfs.readFile(`/static/${name}`, (err, res) => {