-
-
Notifications
You must be signed in to change notification settings - Fork 428
Closed
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
I'm using a custom importer in my project and since the latest update I've been getting the following error:
SassError: Cannot set property 'webpackLoaderContext' of undefined
I've tested it on node v12.22.1 and 14.17.0
Here is the diff that solved my problem:
diff --git a/node_modules/sass-loader/dist/utils.js b/node_modules/sass-loader/dist/utils.js
index 6dac02c..24fc595 100644
--- a/node_modules/sass-loader/dist/utils.js
+++ b/node_modules/sass-loader/dist/utils.js
@@ -93,8 +93,8 @@ function isProductionLikeMode(loaderContext) {
function proxyCustomImporters(importers, loaderContext) {
return [].concat(importers).map(importer => function proxyImporter(...args) {
- this.webpackLoaderContext = loaderContext;
- return importer.apply(this, args);
+ const self = { webpackLoaderContext: loaderContext };
+ return importer.apply(self, args);
});
}
Metadata
Metadata
Assignees
Labels
No labels