UnsupportedFeatureWarning.js 865 B

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