Esbuild Web Worker Type Safety and Redundant tsconfig.worker.json
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- angular, typescript
- Área
- build-system, cli
Línea de trabajo
Empieza reproduciendo el flujo de trabajo descrito de Angular CLI esbuild: genera un web worker, añade un error de tipos y ejecuta ng build. Inspecciona el tsconfig.worker.json generado y la opción webWorkerTsConfig del esquema del builder. Se considera hecho cuando el comportamiento de comprobación de tipos de los workers se haya corregido o documentado claramente, y se haya abordado la configuración engañosa.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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. Alsobuildercontains thewebWorkerTsConfigoption 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
- Generate a new Angular project with esbuild (Angular CLI 18+).
- Add a web worker via ng generate web-worker.
- Introduce a type error in the worker file.
- Run ng build – no type error is reported.
Exception or Error
Your Environment
Any version with esbuild bundler.
Anything else relevant?
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 27k
- Forks
- 11.8k
- Merge medio
- 17 h 25 min
- PR fusionados (30 d)
- 183
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de angular/angular-cli
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server Abiertoarea: @angular/build gemini-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
angular/angular-cli#33055 · 1 comentario · 3 reacciones ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 asignado ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 asignado ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34128 · 1 asignado ·
Todos los issues de angular/angular-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
fil-donadoni/tolaria#4409 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
corsairdev/corsair#1764 ·