Skip to content

fix(@schematics/angular): update the PostCSS configuration used by the build in tailwind - #34571

Merged
alan-agius4 merged 5 commits into
angular:mainfrom
MeAkib:fix/tailwind-postcss-config-lookup
Oct 30, 2026
Merged

alan-agius4 merged 5 commits into
angular:mainfrom
MeAkib:fix/tailwind-postcss-config-lookup

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

The tailwind schematic searched the workspace root before the project root and .postcssrc.json before postcss.config.json, the opposite of the build system. With a configuration in both locations, the schematic added @tailwindcss/postcss to a file the build never reads, so the build succeeded but Tailwind CSS utilities were not generated.

Search the project root first and postcss.config.json first, matching the build system.

…e build in tailwind

The tailwind schematic searched the workspace root before the project root and `.postcssrc.json`
before `postcss.config.json`, the opposite of the build system. With a configuration in both
locations, the schematic added `@tailwindcss/postcss` to a file the build never reads, so the
build succeeded but Tailwind CSS utilities were not generated.

Search the project root first and `postcss.config.json` first, matching the build system.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aligns the Tailwind schematic's PostCSS configuration lookup order with the build system by prioritizing the project root over the workspace root, and 'postcss.config.json' over '.postcssrc.json'. It also adds unit tests to verify these priorities. Feedback is provided to deduplicate and normalize the search paths to prevent redundant file checks when the project root is empty.

MeAkib added a commit to MeAkib/angular-cli that referenced this pull request Oct 28, 2026
…d by the build in tailwind- angular#34571

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@MeAkib
MeAkib force-pushed the fix/tailwind-postcss-config-lookup branch from 9103621 to 6735776 Compare October 28, 2026 16:08
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Oct 28, 2026
@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Oct 28, 2026
@alan-agius4
alan-agius4 self-requested a review October 28, 2026 17:42
MeAkib and others added 2 commits October 29, 2026 00:02
…d by the build in tailwind

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@angular-robot
angular-robot Bot requested a review from alan-agius4 October 28, 2026 18:18
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Oct 30, 2026
@alan-agius4
alan-agius4 merged commit ee847de into angular:main Oct 30, 2026
40 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

@MeAkib
MeAkib deleted the fix/tailwind-postcss-config-lookup branch October 30, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants