Skip to content
This repository was archived by the owner on Sep 9, 2021. It is now read-only.

Commit a0de29b

Browse files
authored
fix: serializing big strings (#304)
1 parent d4fa470 commit a0de29b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/supportWebpack5.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,18 @@ export default function runAsChild(
6060
workerSource,
6161
options
6262
);
63+
const workerCodeBuffer = Buffer.from(workerCode);
6364

6465
return cache.store(
6566
cacheIdent,
6667
cacheETag,
67-
workerCode,
68+
workerCodeBuffer,
6869
(storeCacheError) => {
6970
if (storeCacheError) {
7071
return callback(storeCacheError);
7172
}
7273

73-
return callback(null, workerCode);
74+
return callback(null, workerCodeBuffer);
7475
}
7576
);
7677
});

0 commit comments

Comments
 (0)