sass-loader 16.0.1 → 16.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/utils.js +3 -4
- package/package.json +1 -1
package/dist/utils.js
CHANGED
|
@@ -691,16 +691,15 @@ function normalizeSourceMap(map, rootContext) {
|
|
|
691
691
|
function errorFactory(error) {
|
|
692
692
|
let message;
|
|
693
693
|
if (error.formatted) {
|
|
694
|
-
message = error.formatted.replace(/^Error: /, "");
|
|
694
|
+
message = error.formatted.replace(/^(.+)?Error: /, "");
|
|
695
695
|
} else {
|
|
696
696
|
// Keep original error if `sassError.formatted` is unavailable
|
|
697
|
-
(
|
|
698
|
-
message
|
|
699
|
-
} = error);
|
|
697
|
+
message = (error.message || error.toString()).replace(/^(.+)?Error: /, "");
|
|
700
698
|
}
|
|
701
699
|
const obj = new Error(message, {
|
|
702
700
|
cause: error
|
|
703
701
|
});
|
|
702
|
+
obj.name = error.name;
|
|
704
703
|
obj.stack = null;
|
|
705
704
|
return obj;
|
|
706
705
|
}
|