sass-loader 13.0.1 → 13.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SassError.js +6 -6
- package/package.json +1 -1
package/dist/SassError.js
CHANGED
|
@@ -8,7 +8,11 @@ exports.default = void 0;
|
|
|
8
8
|
class SassError extends Error {
|
|
9
9
|
constructor(sassError) {
|
|
10
10
|
super();
|
|
11
|
-
this.name = "SassError";
|
|
11
|
+
this.name = "SassError"; // Instruct webpack to hide the JS stack from the console.
|
|
12
|
+
// Usually you're only interested in the SASS error in this case.
|
|
13
|
+
|
|
14
|
+
this.hideStack = true;
|
|
15
|
+
Error.captureStackTrace(this, this.constructor);
|
|
12
16
|
|
|
13
17
|
if (typeof sassError.line !== "undefined" || typeof sassError.column !== "undefined") {
|
|
14
18
|
this.loc = {
|
|
@@ -21,11 +25,7 @@ class SassError extends Error {
|
|
|
21
25
|
this.message = `${this.name}: ${typeof sassError.message !== "undefined" ? sassError.message : sassError}`;
|
|
22
26
|
|
|
23
27
|
if (sassError.formatted) {
|
|
24
|
-
this.message = `${this.name}: ${sassError.formatted.replace(/^Error: /, "")}`;
|
|
25
|
-
// Usually you're only interested in the SASS stack in this case.
|
|
26
|
-
|
|
27
|
-
this.hideStack = true;
|
|
28
|
-
Error.captureStackTrace(this, this.constructor);
|
|
28
|
+
this.message = `${this.name}: ${sassError.formatted.replace(/^Error: /, "")}`;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|