Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@angular-devkit/build-angular): disable Worker wait loop for TS/N…
…G parallel compilation in web containers When using the `application` builder, a parallel TS/NG compilation is used that is run inside a Node.js Worker. This Worker by default uses an Atomics-based wait loop to improve performance while waiting for messages. This loop relies on the synchronous API `receiveMessageOnPort`. While this works well in Node.js, the web container execution environment does not currently support passing transferable objects via `receiveMessageOnPort`. Attempting to do so will cause a serialization error and a failed application build. To avoid this problem, the wait loop optimization is disabled when the web container execution environment is detected. This change is only needed for the TS/NG compilation as no other parallel operation within the build system currently uses `receiveMessageOnPort` with transferable objects. (cherry picked from commit 6f9ef1f)
- Loading branch information