UnsupportedFeatureWarning.js 780 B

1234567891011121314151617181920212223242526272829303132
  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. this.name = "UnsupportedFeatureWarning";
  17. this.loc = loc;
  18. this.hideStack = true;
  19. }
  20. }
  21. makeSerializable(
  22. UnsupportedFeatureWarning,
  23. "webpack/lib/UnsupportedFeatureWarning"
  24. );
  25. module.exports = UnsupportedFeatureWarning;