Skip to content

Slowdown in esbuild build time in 20.3.1 and newer #64403

@v-jaros

Description

@v-jaros

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

20.3.0

Description

ng serve suddenly takes almost twice as long to build, no change in config or code, just dependencies update - see package.json examples

package.json that takes 35s to build
"dependencies": {
"@angular/animations": "20.3.0",
"@angular/cdk": "20.2.2",
"@angular/common": "20.3.0",
"@angular/compiler": "20.3.0",
"@angular/core": "20.3.0",
"@angular/forms": "20.3.0",
"@angular/platform-browser": "20.3.0",
"@angular/platform-browser-dynamic": "20.3.0",
"@angular/platform-server": "20.3.0",
"@angular/router": "20.3.0",
...
},
"devDependencies": {
"@angular/build": "20.3.0",
"@angular/cli": "20.3.0",
"@angular/compiler-cli": "20.3.0",
"@angular/language-service": "20.3.0",
...
}

package.json that takes 60s to build
"dependencies": {
"@angular/animations": "20.3.1",
"@angular/cdk": "20.2.2",
"@angular/common": "20.3.1",
"@angular/compiler": "20.3.1",
"@angular/core": "20.3.1",
"@angular/forms": "20.3.1",
"@angular/platform-browser": "20.3.1",
"@angular/platform-browser-dynamic": "20.3.1",
"@angular/platform-server": "20.3.1",
"@angular/router": "20.3.1",
...
},
"devDependencies": {
"@angular/build": "20.3.1",
"@angular/cli": "20.3.1",
"@angular/compiler-cli": "20.3.1",
"@angular/language-service": "20.3.1",
...
}

Minimal Reproduction

ng serve

Exception or Error


Your Environment

=== SLOW BUILDS ENV ===
Angular CLI: 20.3.1
Node: 22.15.1
Package Manager: npm 10.9.2
OS: win32 x64


Angular: 20.3.1
... animations, build, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package                      Version
------------------------------------
@angular-devkit/architect    0.2003.1
@angular-devkit/core         20.3.5
@angular-devkit/schematics   20.3.5
@angular/cdk                 20.2.2
@schematics/angular          20.3.1
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1

=== FAST BUILDS ENV ===
Angular CLI: 20.3.0
Node: 22.15.1
Package Manager: npm 10.9.2
OS: win32 x64


Angular: 20.3.0
... animations, build, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package                      Version
------------------------------------
@angular-devkit/architect    0.2003.0
@angular-devkit/core         20.3.5
@angular-devkit/schematics   20.3.5
@angular/cdk                 20.2.2
@schematics/angular          20.3.0
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilerIssues related to `ngc`, Angular's template compilerarea: performanceIssues related to performanceregressionIndicates than the issue relates to something that worked in a previous version

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions