sass-loader 16.0.0 → 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/README.md +1 -1
- package/dist/utils.js +5 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -362,7 +362,7 @@ module.exports = {
|
|
|
362
362
|
{
|
|
363
363
|
loader: "sass-loader",
|
|
364
364
|
options: {
|
|
365
|
-
sassOptions: (
|
|
365
|
+
sassOptions: (loaderContext) => {
|
|
366
366
|
// More information about available properties https://webpack.js.org/api/loaders/
|
|
367
367
|
const { resourcePath, rootContext } = loaderContext;
|
|
368
368
|
const relativePath = path.relative(rootContext, resourcePath);
|
package/dist/utils.js
CHANGED
|
@@ -519,7 +519,8 @@ function getModernWebpackImporter(loaderContext, implementation, loadPaths) {
|
|
|
519
519
|
});
|
|
520
520
|
return {
|
|
521
521
|
contents,
|
|
522
|
-
syntax
|
|
522
|
+
syntax,
|
|
523
|
+
sourceMapUrl: canonicalUrl
|
|
523
524
|
};
|
|
524
525
|
} catch (err) {
|
|
525
526
|
return null;
|
|
@@ -690,16 +691,15 @@ function normalizeSourceMap(map, rootContext) {
|
|
|
690
691
|
function errorFactory(error) {
|
|
691
692
|
let message;
|
|
692
693
|
if (error.formatted) {
|
|
693
|
-
message = error.formatted.replace(/^Error: /, "");
|
|
694
|
+
message = error.formatted.replace(/^(.+)?Error: /, "");
|
|
694
695
|
} else {
|
|
695
696
|
// Keep original error if `sassError.formatted` is unavailable
|
|
696
|
-
(
|
|
697
|
-
message
|
|
698
|
-
} = error);
|
|
697
|
+
message = (error.message || error.toString()).replace(/^(.+)?Error: /, "");
|
|
699
698
|
}
|
|
700
699
|
const obj = new Error(message, {
|
|
701
700
|
cause: error
|
|
702
701
|
});
|
|
702
|
+
obj.name = error.name;
|
|
703
703
|
obj.stack = null;
|
|
704
704
|
return obj;
|
|
705
705
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sass-loader",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.2",
|
|
4
4
|
"description": "Sass loader for webpack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "webpack-contrib/sass-loader",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"eslint-plugin-import": "^2.28.0",
|
|
91
91
|
"file-loader": "^6.2.0",
|
|
92
92
|
"foundation-sites": "^6.7.5",
|
|
93
|
-
"husky": "^9.
|
|
93
|
+
"husky": "^9.1.3",
|
|
94
94
|
"jest": "^29.6.2",
|
|
95
95
|
"jest-environment-node-single-context": "^29.1.0",
|
|
96
96
|
"lint-staged": "^15.2.0",
|