refactor(build): share the end-of-build steps of production builders

Aperta
#4,990 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rollup, typescript, vite
Ambito
build-system

Direzione di ricerca

Start with the end of the production builder in src/build/rollup/prod.ts and compare it with src/build/rolldown/prod.ts, src/build/rspack/prod.ts and src/build/vite/prod.ts to find the repeated steps: writing build info, logging build time and file tree, calling the compiled hook, and printing hints. Extract a shared helper that takes the build start time and output entry, then switch each builder to call it. Done when the duplicated blocks are gone and the existing build tests still pass for each builder.

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

Descrizione

The end of each builder's production build repeats the same steps: write the build info, log the build time and file tree, call the compiled hook, and print the preview and deploy hints. This is copied across src/build/rollup/prod.ts, src/build/rolldown/prod.ts and src/build/rspack/prod.ts (#4942), and src/build/vite/prod.ts repeats the hints. A shared helper (for example taking the build start time and the output entry) would remove about 30 lines per builder and keep them from drifting apart.

Triaged with AI assistance.

Lingua principale
TypeScript
Stelle
11.5k
Fork
968
Merge medio
4g 9h
PR unite (30g)
64

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 nitrojs/nitro

Tutte le issue di nitrojs/nitro

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.