-
Notifications
You must be signed in to change notification settings - Fork 52
Dashboard – upgrade to Tailwind CSS v4 #1163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add @tailwindcss/postcss dependency for v4 compatibility - Update postcss.config.js to use @tailwindcss/postcss plugin - Fix build errors caused by PostCSS plugin separation in v4 - Regenerate pnpm-lock.yaml with new dependencies Resolves build failures when upgrading from Tailwind v3 to v4
WalkthroughUpdated PostCSS configuration to use the @tailwindcss/postcss plugin and added it as a devDependency in dashboard/package.json. No other files or dependencies were modified. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
dashboard/postcss.config.js (1)
3-5: Optional: remove autoprefixer — Tailwind v4's @tailwindcss/postcss handles vendor prefixesTailwind v4 (via Lightning CSS in @tailwindcss/postcss) performs vendor‑prefixing and modern‑syntax transforms, so you can remove
autoprefixerfrom dashboard/postcss.config.js (and devDependencies) unless you author non‑Tailwind CSS that still requires it.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
dashboard/package.json(1 hunks)dashboard/postcss.config.js(1 hunks)
🔇 Additional comments (1)
dashboard/package.json (1)
65-65: Tailwind v4 PostCSS split: correct dependency added and version-aligned.
@tailwindcss/postcss@^4.1.13matchestailwindcss@^4.1.13. Good placement under devDependencies.
| export default { | ||
| plugins: { | ||
| tailwindcss: {}, | ||
| '@tailwindcss/postcss': {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Switched to '@tailwindcss/postcss' — required for Tailwind v4. LGTM.
Config shape is valid ESM under "type":"module".
Run to ensure no other packages still use the old tailwindcss PostCSS plugin:
🏁 Script executed:
#!/bin/bash
# Find all PostCSS configs and flag legacy plugin usage.
set -euo pipefail
fd -H -a -t f 'postcss.config.*' | while read -r f; do
echo "== $f =="
rg -nC2 -P "(tailwindcss:|require\\(['\"]tailwindcss['\"]\\))|@tailwindcss/postcss" "$f" || true
doneLength of output: 304
Update examples/react-router/postcss.config.js to use '@tailwindcss/postcss'
examples/react-router/postcss.config.js still contains tailwindcss: {} (line 3); replace it with @tailwindcss/postcss: {} so all PostCSS configs use the Tailwind v4 plugin.
🤖 Prompt for AI Agents
In dashboard/postcss.config.js around line 3, the PostCSS config uses the old
key `tailwindcss: {}`; update that entry to use the Tailwind v4 plugin key
`@tailwindcss/postcss: {}` so the file matches other PostCSS configs. Replace
the `tailwindcss` property name with `@tailwindcss/postcss` and keep the same
config object contents.
Fixed Tailwind CSS v4 compatibility in Vite build by updating PostCSS configuration:
This resolves build failures when upgrading from Tailwind v3 to v4.
Summary by CodeRabbit