]> git.immae.eu Git - github/fretlink/purs-loader.git/commitdiff
Clear warnings and errors after use
authoreric thul <thul.eric@gmail.com>
Sun, 12 Jun 2016 20:04:14 +0000 (16:04 -0400)
committereric thul <thul.eric@gmail.com>
Sun, 12 Jun 2016 20:04:14 +0000 (16:04 -0400)
Resolves #57

src/index.js

index fe1455bfc32a686d322c48c35d6ff5d581043c6a..c73fdd5e88cc2c76f925abd85353d28b80f61d2a 100644 (file)
@@ -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()