Skip to content

Angular CLI v20.1 PostCSS Integration Changes Break Third-Party Build Systems - Need Migration Guidance #30802

@JMGomes

Description

@JMGomes

Command

other

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

v20.0.6

Description

Angular CLI v21's PostCSS integration changes (commit 49a0973) have broken Tailwind CSS processing in third-party build systems like Bazel + Aspect Rules JS. The removal of the unified Tailwind detection system and introduction of PostCSS config discovery created an ecosystem compatibility gap.

This isn't a request to fix third-party tools, but rather:

  • Documentation request: How should build system integrators adapt to v21 changes?
  • Ecosystem impact awareness: Significant breaking change affecting Angular + Bazel projects
  • Migration guidance: What's the recommended integration pattern for the new PostCSS system?

Minimal Reproduction

  1. setup a new angular project with tailwind
  2. add tailwind directive
  3. configure bazel
  4. compare styles.css from ng build --configuration production vs bazel build //:web-app-build

Exception or Error

No runtime errors, but silently broken functionality. 
tailwind are not processed

Your Environment

Angular CLI: v21.0.0+
Node.js: v22.12.0
Bazel: Latest with Aspect Rules JS
Tailwind CSS: v3.3.5
PostCSS: v8.5.6
OS: Linux 6.8.0-64-generic

Anything else relevant?

Root Cause Analysis:
The v21 changes introduced two new systems that third-party build tools don't implement - 49a0973

  1. PostCSS Config Discovery - Searches for postcss.config.json, .postcssrc.json
  2. Modified Automatic Detection - New fallback logic when no config found

Evidence from Investigation:
✅ File discovery works: Bazel finds tailwind.config.js
✅ Dependencies available: All PostCSS/Tailwind packages present
✅ Same execution environment: Verified via sandbox debugging
❌ Processing pipeline broken: Third-party tools missing new integration logic

Impact on Ecosystem:

  • Affects all Angular projects using Bazel builds with Tailwind
  • Creates build system inconsistency (same code, different output)
  • No migration documentation exists for build system integrators
  • Forces workaround of using only ng build

Requests for Angular CLI Team:
📚 Documentation: How should third-party build systems implement the new PostCSS discovery?
🛠️ Migration Guide: What's the recommended integration pattern for build tools?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions