Tailwind CSS v4 classes in new or moved files are not picked up by ng serve until another rebuild
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- angular, node.js, tailwindcss, typescript
- Área
- build-system, devtools
Línea de trabajo
Start with src/tools/esbuild/stylesheets/stylesheet-plugin-factory.js, where PostCSS directory dependency messages are expanded and existing files are added to watchFiles. Trace how esbuild receives watch dependencies and how file add, unlink, or rename events are handled. Done means the reproduction generates classes for newly created or moved source files on the next rebuild; an open linked pull request indicates work is already underway.
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
In @angular/build 22.2.2 (and 22.2.3), src/tools/esbuild/stylesheets/stylesheet-plugin-factory.js handles PostCSS dir-dependency messages by expanding the glob with tinyglobby and adding the resulting files to watchFiles. Only files that exist at build time are watched. A file created later, or moved by renaming its folder, is never watched, so classes used only in it are not generated until something else triggers a stylesheet rebuild. esbuild has no directory/glob watch to fall back on, so the dir itself should probably be watched (or the glob re-expanded on add/unlink events).
Minimal Reproduction
- Angular 22 app with Tailwind v4 via @tailwindcss/postcss; run ng serve.
- Create src/app/foo/foo.ts using a class not used elsewhere, e.g. bg-[#123456]. It is generated.
- Rename the folder to src/app/bar/ and edit the file to use bg-[#654321]. The class is not generated.
- Touch src/styles.css. Now it is generated.
NG_BUILD_WATCH_ROOT=1 stops detecting changes entirely. Polling ("poll": 1000) doesn't help either.
Exception or Error
Classes in files added or moved under Tailwind's sources are generated on the next rebuild, as with modifications.
Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI : 22.2.0
Angular : 22.2.0
Node.js : 24.15.0
Package Manager : bun 1.4.2
Operating System : linux x64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/aria │ 22.2.0 │ 22.2.0 │
│ @angular/build │ 22.2.0 │ 22.2.0 │
│ @angular/cdk │ 22.2.0 │ 22.2.0 │
│ @angular/cli │ 22.2.0 │ 22.2.0 │
│ @angular/common │ 22.2.0 │ 22.2.0 │
│ @angular/compiler │ 22.2.0 │ 22.2.0 │
│ @angular/compiler-cli │ 22.2.0 │ 22.2.0 │
│ @angular/core │ 22.2.0 │ 22.2.0 │
│ @angular/material │ 22.2.0 │ 22.2.0 │
│ @angular/platform-browser │ 22.2.0 │ 22.2.0 │
│ @angular/platform-server │ 22.2.0 │ 22.2.0 │
│ @angular/router │ 22.2.0 │ 22.2.0 │
│ @angular/ssr │ 22.2.0 │ 22.2.0 │
│ rxjs │ 7.8.2 │ ^7.8.2 │
│ typescript │ 6.0.2 │ 6.0.2 │
│ vitest │ 4.1.11 │ 4.1.11 │
Anything else relevant?
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 27k
- Forks
- 11.8k
- Merge medio
- 1 d 5 h
- PR fusionados (30 d)
- 244
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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-serverAbiertoarea: @angular/build gemini-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
angular/angular-cli#33955 ·
Los mantenedores suelen responder en 1 día
-
area: @angular/cli gemini-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
angular/angular-cli#33055 · 1 comentario · 3 reacciones ·
Los mantenedores suelen responder en 1 día
-
Angular SSR Unescaped prerender parameters enable RCE through generated manifests and XSS in redirect pagesPosiblemente ocupada @SkyZeroZx la tomó hace 152 días. Abiertoarea: @angular/ssr
Dificultad 4/5 3-5 días Aptitud para principiantes 53/100
angular/angular-cli#34474 ·
Los mantenedores suelen responder en 1 día
-
`ng generate app-shell` and `ng generate module --route` produce broken imports when a component `type` is configuredPosiblemente ocupada @MeAkib la tomó hace 2 días. Abiertoarea: @schematics/angular
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
angular/angular-cli#34449 ·
Los mantenedores suelen responder en 1 día
-
unit-test builder (Vitest): key `fsModuleCache` on the served build output instead of forcing it offPosiblemente ocupada @jv3n la tomó hace 3 días. Abiertoarea: @angular/build
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
angular/angular-cli#34443 ·
Los mantenedores suelen responder en 1 día
Todos los issues de angular/angular-cli
Issues similares
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
openclaw/openclaw#182077 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
aikido high security
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dequelabs/axe-linter-action#161 ·
-
[Feature Request] Update the DimCode agent icon to the 45:32 brand markPosiblemente ocupada @eric8810 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
[Feature]: 建议导入源后,自动切换到新导入的源Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
lyswhut/lx-music-desktop#3026 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
abhigyanpatwari/GitNexus#3704 ·
Los mantenedores suelen responder en 1 día