Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): address `Unable to deserialize cl…
Browse files Browse the repository at this point in the history
…oned data` issue with Yarn PnP

Occasionally, when using Yarn PnP, an error message `Unable to deserialize cloned data` arises during the optimization phase of JavaScript bundles. This update rectifies the problem.

See: http://b/335203823
(cherry picked from commit 1c3ff61)
  • Loading branch information
alan-agius4 committed Apr 17, 2024
1 parent 0335d6a commit 6191d06
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ export class JavaScriptTransformer {
sideEffects,
...this.#commonOptions,
},
{ transferList: [data.buffer] },
{
// The below is disable as with Yarn PNP this causes build failures with the below message
// `Unable to deserialize cloned data`.
transferList: process.versions.pnp ? undefined : [data.buffer],
},
)) as Uint8Array;

// If there is a cache then store the result
Expand Down

0 comments on commit 6191d06

Please sign in to comment.