From c182bc2e7647aa7c71e2a68832d78990e07feab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Wed, 26 Oct 2016 14:03:23 +0100 Subject: [PATCH] log embed errors --- ui/webpack/base.js | 4 +--- ui/webpack/embed-markdown-loader/src/compile/compile.js | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/webpack/base.js b/ui/webpack/base.js index 414aad6d..29c35d45 100644 --- a/ui/webpack/base.js +++ b/ui/webpack/base.js @@ -19,9 +19,7 @@ const plugins = { require('postcss-cssnext')() ] }, - 'embed-markdown-loader': { - mode: 'plain' - } + 'embed-markdown-loader': {} } }) }; diff --git a/ui/webpack/embed-markdown-loader/src/compile/compile.js b/ui/webpack/embed-markdown-loader/src/compile/compile.js index e48dffb8..59da11f8 100644 --- a/ui/webpack/embed-markdown-loader/src/compile/compile.js +++ b/ui/webpack/embed-markdown-loader/src/compile/compile.js @@ -67,13 +67,14 @@ module.exports = ({ compiler.run((err, stats) => { if (err) { - return fn(err); + return fn(err, {}); } const errors = stats.toJson().errors; if (errors && errors.length) { - return fn(errors); + errors.map(err => console.log(err)); + return fn(errors, {}); } mfs.readFile(`/static/${name}`, (err, res) => {