Logger.js 680 B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Logger = void 0;
  4. var Logger = /** @class */ (function () {
  5. function Logger(stats) {
  6. this.stats = stats;
  7. }
  8. Logger.prototype.warn = function (compilation, message) {
  9. if (this.stats.warnings) {
  10. compilation.warnings.push("" + Logger.LOG_PREFIX + message);
  11. }
  12. };
  13. Logger.prototype.error = function (compilation, message) {
  14. if (this.stats.errors) {
  15. compilation.errors.push("" + Logger.LOG_PREFIX + message);
  16. }
  17. };
  18. Logger.LOG_PREFIX = 'license-webpack-plugin: ';
  19. return Logger;
  20. }());
  21. exports.Logger = Logger;