ModuleDependencyWarning.js 554 B

1234567891011121314151617181920212223242526
  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. module.exports = class ModuleDependencyWarning extends WebpackError {
  8. constructor(module, err, loc) {
  9. super(err.message);
  10. this.name = "ModuleDependencyWarning";
  11. this.details = err.stack
  12. .split("\n")
  13. .slice(1)
  14. .join("\n");
  15. this.module = module;
  16. this.loc = loc;
  17. this.error = err;
  18. this.origin = module.issuer;
  19. Error.captureStackTrace(this, this.constructor);
  20. }
  21. };