UnsupportedFeatureWarning.js 919 B

123456789101112131415161718192021222324252627282930313233343536
  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 UnsupportedFeatureWarning extends WebpackError {
  10. /**
  11. * Creates an instance of UnsupportedFeatureWarning.
  12. * @param {string} message description of warning
  13. * @param {DependencyLocation} loc location start and end positions of the module
  14. */
  15. constructor(message, loc) {
  16. super(message);
  17. /** @type {string} */
  18. this.name = "UnsupportedFeatureWarning";
  19. /** @type {DependencyLocation} */
  20. this.loc = loc;
  21. /** @type {boolean} */
  22. this.hideStack = true;
  23. }
  24. }
  25. makeSerializable(
  26. UnsupportedFeatureWarning,
  27. "webpack/lib/UnsupportedFeatureWarning"
  28. );
  29. module.exports = UnsupportedFeatureWarning;