Skip to content

Commit aa016fb

Browse files
committed
Fix shared context between webpack instances
Fixes #189
1 parent 859acbd commit aa016fb

File tree

1 file changed

+3
-5
lines changed
  • packages/node-sass-once-importer/src

1 file changed

+3
-5
lines changed

packages/node-sass-once-importer/src/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ const EMPTY_IMPORT = {
99
};
1010

1111
export = function onceImporter() {
12-
const contextTemplate = {
13-
store: new Set(),
14-
};
15-
1612
return function importer(url: string, prev: string) {
1713
const nodeSassOptions = this.options;
1814
// Create a context for the current importer run.
1915
// An importer run is different from an importer instance,
2016
// one importer instance can spawn infinite importer runs.
2117
if (!this.nodeSassOnceImporterContext) {
22-
this.nodeSassOnceImporterContext = Object.assign({}, contextTemplate);
18+
this.nodeSassOnceImporterContext = {
19+
store: new Set(),
20+
};
2321
}
2422

2523
// Each importer run has it's own new store, otherwise

0 commit comments

Comments
 (0)