fix(docs): include @uploadthing/react in Tailwind content#1268
fix(docs): include @uploadthing/react in Tailwind content#1268markflorkowski merged 1 commit intopingdotgg:mainfrom
Conversation
…tyles are not purged Add explicit content path for node_modules/@uploadthing/react/dist so Tailwind keeps button and allowed-content classes (e.g. blue styles) when building the docs site. Closes pingdotgg#1250
|
|
@2u841r is attempting to deploy a commit to the Ping Labs Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughTailwind configuration updated to include UploadThing's React distribution files from node_modules in the content scanning path, ensuring CSS classes from the dependency are properly included during the production build process. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
Greptile SummaryAdds explicit content path Key Changes:
Analysis: Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 4315917 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
The blue color was missing because Tailwind wasn’t picking up the styles from
@uploadthing/react. The button classes likebg-blue-600,bg-blue-400, and text-white are defined inside that package, and Tailwind only keeps classes it finds while scanning files.The docs use
withUt(), which normally adds the UploadThing content path usingrequire.resolve("@uploadthing/react"). But in this setup, Tailwind wasn’t scanning the built dist files, so those classes were removed during build. That’s why the buttons lost their blue styles.To fix it, the Tailwind config in docs/tailwind.config.ts was updated. The following path was added to the content array:
./node_modules/@uploadthing/react/dist/**/*.{js,mjs}. This makes sure Tailwind always scans the installed UploadThing React build and keeps the button styles. After restarting or rebuilding the docs app, the blue buttons show up again.Closes #1250
Summary by CodeRabbit