From 28eec311712c15e573b24f2a7f2721f6d373b209 Mon Sep 17 00:00:00 2001 From: Max Leaver Date: Wed, 27 Jun 2018 09:49:08 -0400 Subject: [PATCH] Fix #350 - Warnings are emitted as errors instead of strings --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 6db1dca1..4e7f891c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -143,7 +143,7 @@ module.exports = function loader (css, map, meta) { return postcss(plugins) .process(css, options) .then((result) => { - result.warnings().forEach((msg) => this.emitWarning(msg.toString())) + result.warnings().forEach((msg) => this.emitWarning(new Error(msg.toString()))) result.messages.forEach((msg) => { if (msg.type === 'dependency') this.addDependency(msg.file)