incorrect detection of zoneless app
Mantenedores costumam responder em até 1 dia
@maruthang já está trabalhando nisso.
Desde 27/3/2026.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 52/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- angular, typescript
- Domínio
- build-system, cli
Direção de pesquisa
Comece em packages/angular/build/src/tools/esbuild/utils.ts, nas linhas 469-478, e depois execute o comando de build com um arquivo JavaScript ou TypeScript no array polyfills e com zone.js indisponível. Está concluído quando um app zoneless não é detectado incorretamente como non-zoneless e o polyfill baseado em arquivo continua funcionando.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Command
build
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
No response
Description
Including any js/ts file in the polyfills array causes the angular server to incorrectly identify the app as a non-zoneless app. Thus it tries to include zone.js, which is deleted, because I uninstall the package as per the guide.
Minimal Reproduction
Exception or Error
Your Environment
Angular CLI: 20.1.0
Node: 22.14.0
Package Manager: pnpm 10.13.1
OS: linux x64
Angular: 20.1.0
... animations, build, cdk, cli, common, compiler, compiler-cli
... core, forms, language-service, material
... material-luxon-adapter, platform-browser
... platform-browser-dynamic, platform-server, router, ssr
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.2001.0
@angular-devkit/build-angular 20.1.0
@angular-devkit/core 20.1.0
@angular-devkit/schematics 20.1.0
@schematics/angular 20.0.6
ng-packagr 20.0.1
rxjs 7.8.1
typescript 5.8.3
Anything else relevant?
TLDR
This is essentially a re-open of #28898. Developers are forced to avoid adding any js/ts file to the polyfills array. Instead, they have to create js scripts inline inside index.html, or write js files, and include them as assets with index.html
The problem is within these lines:
https://github.com/angular/angular-cli/blob/2c3a46b9ecf69049fbddb2c912636d9d62e197df/packages/angular/build/src/tools/esbuild/utils.ts#L469-L478
The presence of any js/ts file in the polyfills array causes zone to be included, even though I uninstalled zone.js and do everything zone-less-ly.
I had a file called polyfill-buffer.ts which I used to add to the polyfill array:
import { Buffer } from 'buffer';
if (!globalThis.Buffer) {
Object.assign(globalThis, { Buffer });
}
Now I have to add it to index.html as a script
import { Buffer } from 'https://cdn.jsdelivr.net/npm/buffer/+esm';
if (!globalThis.Buffer) {
Object.assign(globalThis, { Buffer });
}
This is maintainable for small scripts like these. But it eliminates the possibility of using any file-based polyfill stuff.
- Linguagem predominante
- TypeScript
- Estrelas
- 27k
- Forks
- 11.8k
- Merge médio
- 1d 2h
- PRs com merge (30d)
- 225
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de angular/angular-cli
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Abertaarea: @angular/build
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
angular/angular-cli#34764 ·
Mantenedores costumam responder em até 1 dia
-
ng add @angular/ssr fails with TypeError when an NgModule in the app module file has no bootstrap arrayTalvez já em andamento @0z5a assumiu hoje. Abertaarea: @schematics/angular
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
angular/angular-cli#34761 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
angular/angular-cli#34760 ·
Mantenedores costumam responder em até 1 dia
-
Angular SSR can crash `AngularAppEngine` servers with a single aborted request (22.2.6 regression)Talvez já em andamento @SkyZeroZx assumiu há 1 dia. Abertaarea: @angular/ssr
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 20/100
angular/angular-cli#34754 ·
Mantenedores costumam responder em até 1 dia
-
area: @schematics/angular
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 74/100
angular/angular-cli#34730 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de angular/angular-cli
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
fb55/htmlparser2#2579 ·
Mantenedores costumam responder em até 1 dia
-
bug good first issue needs-review
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 83/100
Mantenedores costumam responder em até 1 dia
-
Add Module DB RulesAbertadocumentation public
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 68/100
midnightntwrk/umbradb#65 ·
Mantenedores costumam responder em até 2 dias
-
area/channels kind/bug priority/medium
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
nanocoai/nanoclaw#4501 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
needs verification
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 13 dias