Skip to content

Commit 67aa139

Browse files
fix: crash in custom importers with worker threads (#958)
1 parent 2b6b4f3 commit 67aa139

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ function proxyCustomImporters(importers, loaderContext) {
8181
return [].concat(importers).map(
8282
(importer) =>
8383
function proxyImporter(...args) {
84-
this.webpackLoaderContext = loaderContext;
84+
const self = { ...this, webpackLoaderContext: loaderContext };
8585

86-
return importer.apply(this, args);
86+
return importer.apply(self, args);
8787
}
8888
);
8989
}

0 commit comments

Comments
 (0)