CommentCompilationWarning.js 729 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const WebpackError = require("./WebpackError");
  7. const makeSerializable = require("./util/makeSerializable");
  8. /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
  9. class CommentCompilationWarning extends WebpackError {
  10. /**
  11. *
  12. * @param {string} message warning message
  13. * @param {DependencyLocation} loc affected lines of code
  14. */
  15. constructor(message, loc) {
  16. super(message);
  17. this.name = "CommentCompilationWarning";
  18. this.loc = loc;
  19. }
  20. }
  21. makeSerializable(
  22. CommentCompilationWarning,
  23. "webpack/lib/CommentCompilationWarning"
  24. );
  25. module.exports = CommentCompilationWarning;