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

Commit

Permalink
fix: serializing big strings (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramasilveyra authored Dec 23, 2020
1 parent d4fa470 commit a0de29b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/supportWebpack5.js
Original file line number Diff line number Diff line change
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

0 comments on commit a0de29b

Please sign in to comment.