From 0b853815ef14d35cedebc2c7806fd2f9ff9d5ab5 Mon Sep 17 00:00:00 2001 From: eric thul Date: Sun, 12 Jun 2016 16:04:14 -0400 Subject: [PATCH] Clear warnings and errors after use Resolves #57 --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index fe1455b..c73fdd5 100644 --- a/src/index.js +++ b/src/index.js @@ -67,10 +67,12 @@ module.exports = function purescriptLoader(source, map) { this._compiler.plugin('after-compile', (compilation, callback) => { if (options.warnings && cache.warnings) { compilation.warnings.unshift(`PureScript compilation:\n${cache.warnings}`) + cache.warnings = null; } if (cache.errors) { compilation.errors.unshift(`PureScript compilation:\n${cache.errors}`) + cache.errors = null; } callback() -- 2.41.0