1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | "use strict";
|
7 |
|
8 | const WebpackError = require("./WebpackError");
|
9 | const makeSerializable = require("./util/makeSerializable");
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | class ModuleDependencyWarning extends WebpackError {
|
15 | |
16 |
|
17 |
|
18 |
|
19 |
|
20 | constructor(module, err, loc) {
|
21 | super(err ? err.message : "");
|
22 |
|
23 | this.name = "ModuleDependencyWarning";
|
24 | this.details =
|
25 | err && !( (err).hideStack)
|
26 | ? err.stack.split("\n").slice(1).join("\n")
|
27 | : undefined;
|
28 | this.module = module;
|
29 | this.loc = loc;
|
30 |
|
31 | this.error = err;
|
32 |
|
33 | if (err && (err).hideStack) {
|
34 | this.stack =
|
35 | err.stack.split("\n").slice(1).join("\n") + "\n\n" + this.stack;
|
36 | }
|
37 | }
|
38 | }
|
39 |
|
40 | makeSerializable(
|
41 | ModuleDependencyWarning,
|
42 | "webpack/lib/ModuleDependencyWarning"
|
43 | );
|
44 |
|
45 | module.exports = ModuleDependencyWarning;
|