Skip to content

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

Open
MeAkib wants to merge 5 commits into
angular:mainfrom
MeAkib:fix/tailwind-postcss-config-lookup
Open

MeAkib wants to merge 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.

Comment thread packages/schematics/angular/tailwind/index.ts Outdated
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
Comment thread packages/schematics/angular/tailwind/index.ts Outdated
@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: Alan Agius <alan.agius4@gmail.com>
…d by the build in tailwind

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Comment thread packages/schematics/angular/tailwind/index.ts Outdated
…d by the build in tailwind

Co-authored-by: Alan Agius <alan.agius4@gmail.com>
@angular-robot
angular-robot Bot requested a review from alan-agius4 October 28, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews 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