Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8b84c18

Browse filesBrowse files
clydindgp1130
authored andcommitted
fix(@angular-devkit/build-angular): provide workaround for V8 object spread performance defect
V8 currently has a performance defect involving object spread operations that can cause degradation in runtime performance. By specifically not supporting the object spread language feature when using the esbuild-based browser application builder, a downlevel form will be used instead which provides a workaround for the performance issue. The downlevel form can cause up to a 600 byte increase in file size if an object spread operation would otherwise be present in an output file. For more details: https://bugs.chromium.org/p/v8/issues/detail?id=11536 (cherry picked from commit 942d555)
1 parent ceda5d6 commit 8b84c18
Copy full SHA for 8b84c18

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
  • packages/angular_devkit/build_angular/src/builders/browser-esbuild
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts

Copy file name to clipboardExpand all lines: packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ function createCodeBundleOptions(
258258
// loader to perform the downlevel transformation.
259259
// NOTE: If esbuild adds support in the future, the babel support for async generators can be disabled.
260260
'async-await': false,
261+
// V8 currently has a performance defect involving object spread operations that can cause signficant
262+
// degradation in runtime performance. By not supporting the language feature here, a downlevel form
263+
// will be used instead which provides a workaround for the performance issue.
264+
// For more details: https://bugs.chromium.org/p/v8/issues/detail?id=11536
265+
'object-rest-spread': false,
261266
},
262267
mainFields: ['es2020', 'browser', 'module', 'main'],
263268
conditions: ['es2020', 'es2015', 'module'],

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.