Skip to content

Commit fb8e3c3

Browse files
committedJul 1, 2024
fix(@angular/build): allow top-level await in zoneless applications
With the potential future introduction of features such as WASM/ES module integration and the experimental chunk optimizer, the need to restrict top-level await usage is no longer needed and a blocker for new features. As such, top-level await will now be available if an application has been configured to be zoneless. Zoneless Angular is currently experimental and more details can be found here: https://angular.dev/guide/experimental/zoneless (cherry picked from commit fea8044)
1 parent 1eb36e5 commit fb8e3c3

File tree

1 file changed

+0
-2
lines changed
  • packages/angular/build/src/tools/esbuild

1 file changed

+0
-2
lines changed
 

‎packages/angular/build/src/tools/esbuild/utils.ts

-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ export function getFeatureSupport(
180180
// will be used instead which provides a workaround for the performance issue.
181181
// For more details: https://bugs.chromium.org/p/v8/issues/detail?id=11536
182182
'object-rest-spread': false,
183-
// Using top-level-await is not guaranteed to be safe with some code optimizations.
184-
'top-level-await': false,
185183
};
186184

187185
// Detect Safari browser versions that have a class field behavior bug

0 commit comments

Comments
 (0)