chore: document supported Tailwind v4 setup#2204
chore: document supported Tailwind v4 setup#2204benpsnyder wants to merge 3 commits intoanalogjs:alphafrom
Conversation
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThis PR adds comprehensive Tailwind CSS v4 integration documentation and updates scaffolding templates to enforce a specific plugin ordering in Vite configurations. The key change requires Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes The changes follow a consistent, repetitive pattern (reordering 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a2f2b23 to
8992050
Compare
|
@coderabbitai resume |
✅ Actions performedReviews resumed. |
|
If we need a difference between dev/prod, we shouldn't recommend the |
|
This PR touches multiple package scopes: Please confirm the changes are closely related. |
d36190f to
8fb2979
Compare
|
@brandonroberts I force-pushed this with rebase merge ready commits. Cleaned it up and refocused it. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/docs-app/docs/integrations/tailwind/index.md`:
- Around line 127-131: Update the "HMR" section to add an explicit
Angular-version caveat: state that Angular HMR support requires Angular v19+ and
that Angular v16–v18 intentionally disable HMR and emit a runtime console
warning; reference the HMR heading in
apps/docs-app/docs/integrations/tailwind/index.md and, if helpful, link or
cross-reference the guidance in apps/docs-app/docs/guides/migrating.md (PR
`#2226`) so readers don’t assume HMR behaves the same across all supported Angular
versions.
In `@packages/vite-plugin-angular/README.md`:
- Line 97: Replace the relative docs link "/docs/integrations/tailwind" in the
README (the markdown link text "Tailwind CSS integration guide") with an
absolute docs URL (e.g.
https://your-docs-site.example/docs/integrations/tailwind) so the link resolves
correctly on GitHub/NPM README renderers; update the markdown link target to the
canonical site URL and verify the live README renders the link correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d2615d25-bdd1-4f9c-8523-b85dda81f871
⛔ Files ignored due to path filters (1)
packages/nx-plugin/src/generators/preset/__snapshots__/generator.spec.ts.snapis excluded by!**/*.snapand included bypackages/**
📒 Files selected for processing (11)
apps/docs-app/docs/integrations/tailwind/index.mdapps/docs-app/docs/packages/create-analog/overview.mdapps/docs-app/docs/packages/vite-plugin-angular/css-preprocessors.mdpackages/create-analog/__tests__/cli.spec.tspackages/create-analog/template-latest/vite.config.tspackages/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__packages/nx-plugin/src/generators/app/files/template-angular-v18/vite.config.ts__template__packages/nx-plugin/src/generators/app/files/template-angular-v19/vite.config.ts__template__packages/nx-plugin/src/generators/app/files/template-angular/vite.config.ts__template__packages/nx-plugin/src/generators/app/generator.spec.tspackages/vite-plugin-angular/README.md
| ## HMR | ||
|
|
||
| Prefer `hmr` over `liveReload` when you need to configure Angular HMR explicitly. `liveReload` remains a compatibility alias. | ||
|
|
||
| Tailwind support does not require you to enable HMR manually. The stylesheet pipeline is handled independently from whether Angular can produce a hot component update for a given edit. |
There was a problem hiding this comment.
Add Angular version caveat to the HMR note.
This section should explicitly mention that Angular HMR requires Angular v19+ (Angular v16–v18 disable HMR and warn at runtime), otherwise readers may infer HMR behavior is uniformly available across supported Angular versions.
Based on learnings: In apps/docs-app/docs/guides/migrating.md (PR #2226), Analog's Angular HMR requires Angular v19+ and Angular v16–v18 intentionally disable HMR with a console warning.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/docs-app/docs/integrations/tailwind/index.md` around lines 127 - 131,
Update the "HMR" section to add an explicit Angular-version caveat: state that
Angular HMR support requires Angular v19+ and that Angular v16–v18 intentionally
disable HMR and emit a runtime console warning; reference the HMR heading in
apps/docs-app/docs/integrations/tailwind/index.md and, if helpful, link or
cross-reference the guidance in apps/docs-app/docs/guides/migrating.md (PR
`#2226`) so readers don’t assume HMR behaves the same across all supported Angular
versions.
|
|
||
| The plugin supports Tailwind CSS v4 for Angular component styles, including `@apply` in `.component.css` files. | ||
|
|
||
| See the [Tailwind CSS integration guide](/docs/integrations/tailwind) for the supported setup, including: |
There was a problem hiding this comment.
Use an absolute docs URL to avoid broken README navigation.
Line 97 uses /docs/integrations/tailwind, which can resolve incorrectly on GitHub/NPM README renderers.
Suggested fix
-See the [Tailwind CSS integration guide](/docs/integrations/tailwind) for the supported setup, including:
+See the [Tailwind CSS integration guide](https://analogjs.org/docs/integrations/tailwind) for the supported setup, including:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| See the [Tailwind CSS integration guide](/docs/integrations/tailwind) for the supported setup, including: | |
| See the [Tailwind CSS integration guide](https://analogjs.org/docs/integrations/tailwind) for the supported setup, including: |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/vite-plugin-angular/README.md` at line 97, Replace the relative docs
link "/docs/integrations/tailwind" in the README (the markdown link text
"Tailwind CSS integration guide") with an absolute docs URL (e.g.
https://your-docs-site.example/docs/integrations/tailwind) so the link resolves
correctly on GitHub/NPM README renderers; update the markdown link target to the
canonical site URL and verify the live README renders the link correctly.
PR Checklist
Related:
Affected scope
Recommended merge strategy for maintainer [optional]
What is the new behavior?
This PR is now the narrow Tailwind follow-up to Tailwind stylesheet pipeline overhaul analogjs/analog#2226 and the closeout direction from RFC: Tailwind stylesheet pipeline overhaul analogjs/analog#2229.
Against the current
analogjs/alphatip, the live diff does two things:analog()is listed beforetailwindcss()increate-analogand Nx app scaffolds@analogjs/vite-plugin-angularREADME pointer around the supported v3alphasetup that generated apps already useThe docs now explicitly describe the current pipeline split:
@tailwindcss/vitepostcss.config.mjswith@tailwindcss/postcssCurrent diff in this PR
Generator alignment:
packages/create-analog/template-latest/vite.config.tspackages/nx-plugin/src/generators/app/files/template-angular*/vite.config.ts__template__Docs and README cleanup:
apps/docs-app/docs/integrations/tailwind/index.mdapps/docs-app/docs/packages/create-analog/overview.mdapps/docs-app/docs/packages/vite-plugin-angular/css-preprocessors.mdpackages/vite-plugin-angular/README.mdTest plan
nx format:checkpnpm buildpnpm testTargeted verification run for this branch:
pnpm exec vitest run packages/create-analog/__tests__/cli.spec.tspnpm exec vitest run --globals packages/nx-plugin/src/generators/app/generator.spec.ts packages/nx-plugin/src/generators/preset/generator.spec.tsDoes this PR introduce a breaking change?
Other information
This PR should be reviewed as a small consistency follow-up, not as a second implementation pass on the Tailwind pipeline itself. The pipeline/runtime work is already in Tailwind stylesheet pipeline overhaul analogjs/analog#2226.