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

fix: serializing big strings #304

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/supportWebpack5.js
Expand Up @@ -60,17 +60,18 @@ export default function runAsChild(
workerSource,
options
);
const workerCodeBuffer = Buffer.from(workerCode);

return cache.store(
cacheIdent,
cacheETag,
workerCode,
workerCodeBuffer,
(storeCacheError) => {
if (storeCacheError) {
return callback(storeCacheError);
}

return callback(null, workerCode);
return callback(null, workerCodeBuffer);
}
);
});
Expand Down