Esbuild Web Worker Type Safety and Redundant tsconfig.worker.json
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- angular, typescript
- Domaine
- build-system, cli
Piste de recherche
Commencez par reproduire le workflow Angular CLI esbuild décrit : générez un web worker, ajoutez une erreur de type et exécutez ng build. Examinez le tsconfig.worker.json généré ainsi que l’option webWorkerTsConfig du schéma du builder. Le travail est considéré comme terminé lorsque le comportement de vérification des types des workers est corrigé ou clairement documenté, et que la configuration trompeuse est traitée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- TypeScript
- Étoiles
- 27k
- Forks
- 11.8k
- Merge moyen
- 16 h 35 min
- PR mergées (30 j)
- 176
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de angular/angular-cli
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server Ouvertearea: @angular/build gemini-triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
angular/angular-cli#33055 · 1 commentaire · 3 réactions ·
-
unit-test: with --coverage, a setup file's hooks reach only the first spec file of each worker Ouvertearea: @angular/build gemini-triaged
Difficulté 4/5 3-5 jours Accessibilité débutants 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 personne assignée ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 personne assignée ·
Toutes les issues de angular/angular-cli
Issues similaires
-
S: triage
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
snapshot-labs/stamp#666 ·
-
fix(api): prevent leaderboard SSE heartbeat from starting after disconnect during initial load Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
GauravKarakoti/SecureFlow#1070 · 1 commentaire ·
-
feature:Languages/Translations good first issue ready Web
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
digitalfabrik/integreat-app#4394 ·