Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CLI doesn't allow custom builder to pass additional extensions when building app for i18n extractions

Aperta
#27,264 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
angular, typescript

Direzione di ricerca

Inizia in packages/angular_devkit/build_angular/src/builders/extract-i18n/application-extraction.ts alla riga collegata e confronta il modo in cui le normali build dell’applicazione ricevono le estensioni. Verifica che extract-i18n passi le estensioni personalizzate del builder durante la compilazione dell’applicazione e che messages.xlf contenga i messaggi estratti anziché essere vuoto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: @angular-devkit/build-angular devkit/build-angular:i18n freq1: low severity3: broken type: bug/fix
Command

extract-i18n

Description

We're in the process of migrating from webpack to esbuild.
To provide custom esbuild plugins we decided to use custom builder (https://github.com/just-jeb/angular-builders).

It went smooth until we realised that extract-i18 no longer works. It ends successfully but messages.xlf is empty.

It turned out that angular checks builderName to choose which bundler to use.

To fix that I decided to implement custom extract-i18n builder that will trick angular/cli and force using esbuild -
https://github.com/just-jeb/angular-builders/pull/1711

For the record nrwl/nx did the same - https://github.com/nrwl/nx/pull/21802

The issue is that angular/cli will not let us pass any extensions during i18n application compilation.

https://github.com/angular/angular-cli/blob/1034bb155b58a5f18eecf56409a3ff99d2ca4474/packages/angular_devkit/build_angular/src/builders/extract-i18n/application-extraction.ts#L59

It may lead to inconsistency between build and extract flow, which I suppose may lead to issues with i18n.

Describe the solution you'd like

We should be able to pass custom extensions as for regular app building.

(bonus) would be really nice if these if (builderName === ... are replaced by something that is custom builder friendly 🙏

Describe alternatives you've considered

Alternatively we could rewrite whole extract-i18n builder, but as 95% of the code would be the same - it seems pointless

Lingua principale
TypeScript
Stelle
27k
Fork
11.8k
Merge medio
16h 35m
PR unite (30g)
176

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di angular/angular-cli

Tutte le issue di angular/angular-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.