项目原始demo,不改动
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Dieses Repo ist archiviert. Du kannst Dateien sehen und es klonen, kannst aber nicht pushen oder Issues/Pull-Requests öffnen.
 
 
 
 

30 Zeilen
734 B

  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. let deprecationReported = false;
  7. class NoErrorsPlugin {
  8. apply(compiler) {
  9. compiler.plugin("should-emit", (compilation) => {
  10. if(!deprecationReported) {
  11. compilation.warnings.push("webpack: Using NoErrorsPlugin is deprecated.\n" +
  12. "Use NoEmitOnErrorsPlugin instead.\n");
  13. deprecationReported = true;
  14. }
  15. if(compilation.errors.length > 0)
  16. return false;
  17. });
  18. compiler.plugin("compilation", (compilation) => {
  19. compilation.plugin("should-record", () => {
  20. if(compilation.errors.length > 0)
  21. return false;
  22. });
  23. });
  24. }
  25. }
  26. module.exports = NoErrorsPlugin;