UI for Zipcoin Blue

NoEmitOnErrorsPlugin.js 490B

1234567891011121314151617181920212223
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. class NoEmitOnErrorsPlugin {
  7. apply(compiler) {
  8. compiler.plugin("should-emit", (compilation) => {
  9. if(compilation.errors.length > 0)
  10. return false;
  11. });
  12. compiler.plugin("compilation", (compilation) => {
  13. compilation.plugin("should-record", () => {
  14. if(compilation.errors.length > 0)
  15. return false;
  16. });
  17. });
  18. }
  19. }
  20. module.exports = NoEmitOnErrorsPlugin;