From 91de28edee4db92131c37b893261c553f5feabd0 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 4 Mar 2018 10:12:09 -0500 Subject: [PATCH] emit warnings to webpack - fixes #35 --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index cc9c6e5d..bd985080 100644 --- a/index.js +++ b/index.js @@ -70,6 +70,8 @@ module.exports = function(source, map) { if (!options.name) options.name = capitalize(sanitize(options.filename)); + if (!options.onwarn) options.onwarn = warning => this.emitWarning(new Error(warning)); + preprocess(source, options).then(processed => { let { code, map, css, cssMap, ast } = compile(processed.toString(), options);