Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Esbuild Web Worker Type Safety and Redundant tsconfig.worker.json

Aberta
#30,676 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
angular, typescript
Domínio
build-system, cli

Direção de pesquisa

Comece reproduzindo o fluxo de trabalho descrito do Angular CLI esbuild: gere um web worker, adicione um erro de tipo e execute ng build. Inspecione o tsconfig.worker.json gerado e a opção webWorkerTsConfig do schema do builder. O trabalho estará concluído quando o comportamento de verificação de tipos dos workers for corrigido ou claramente documentado, e a configuração enganosa for tratada.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

angular/build:application area: @angular/build freq1: low severity1: confusing type: bug/fix
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

When using esbuild as the bundler for Angular projects, the support for web workers appears misleading in terms of type safety:

  • In the previous webpack-based build setup, web workers had proper TypeScript type checking at build time.

  • Currently, esbuild does not type-check web workers during build time. This is not documented or clearly communicated, leading to a false sense of correctness.

  • Additionally, creating a project with a web worker generates a tsconfig.worker.json, which seems redundant because esbuild doesn't use it for type-checking. Also builder contains the webWorkerTsConfig option in the schema, as I understand it, this doesn't affect anything. This can confuse developers into thinking their web worker code is properly validated.

Expected Behavior

Either esbuild-based builder should perform type checking on web worker files, or there should be clear documentation and/or warnings that type-checking is not performed on workers.

Current Behavior

  • No build-time type checking for worker code.

  • Misleading tsconfig.worker.json is generated, giving false confidence in type safety.

Minimal Reproduction
  1. Generate a new Angular project with esbuild (Angular CLI 18+).
  2. Add a web worker via ng generate web-worker.
  3. Introduce a type error in the worker file.
  4. Run ng build – no type error is reported.
Exception or Error

Your Environment
Any version with esbuild bundler.
Anything else relevant?

No response

Linguagem predominante
TypeScript
Estrelas
27k
Forks
11.8k
Merge médio
17h 25min
PRs com merge (30d)
183

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de angular/angular-cli

Todas as issues de angular/angular-cli

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.