Skip to content

fix(docs): include @uploadthing/react in Tailwind content#1268

Merged
markflorkowski merged 1 commit intopingdotgg:mainfrom
2u841r:main
Feb 26, 2026
Merged

fix(docs): include @uploadthing/react in Tailwind content#1268
markflorkowski merged 1 commit intopingdotgg:mainfrom
2u841r:main

Conversation

@2u841r
Copy link
Contributor

@2u841r 2u841r commented Feb 18, 2026

The blue color was missing because Tailwind wasn’t picking up the styles from @uploadthing/react. The button classes like bg-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 using require.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

  • Bug Fixes
    • Fixed Tailwind CSS configuration to ensure UploadThing component styles are properly included in the build process.

…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
@changeset-bot
Copy link

changeset-bot bot commented Feb 18, 2026

⚠️ No Changeset found

Latest commit: 4315917

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 18, 2026

@2u841r is attempting to deploy a commit to the Ping Labs Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

Walkthrough

Tailwind 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

Cohort / File(s) Summary
Tailwind Configuration
docs/tailwind.config.ts
Expanded content scanning array to include UploadThing's React distribution files (node_modules/@uploadthing/react/dist/**) alongside existing source file patterns, affecting which CSS classes are processed during build.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding @uploadthing/react to Tailwind content configuration for the docs site.
Linked Issues check ✅ Passed The PR directly addresses issue #1250 by including the @uploadthing/react package in Tailwind content scanning to prevent CSS class purging in production builds.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the Tailwind configuration file only, directly addressing the CSS purging issue identified in the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link

greptile-apps bot commented Feb 18, 2026

Greptile Summary

Adds explicit content path ./node_modules/@uploadthing/react/dist/**/*.{js,mjs} to Tailwind configuration to fix purged button styles in docs build.

Key Changes:

  • Explicitly includes @uploadthing/react/dist files in Tailwind's content scanning
  • Works around withUt function's limitation in monorepo workspace setups where require.resolve may not correctly detect workspace-linked packages
  • Ensures button and allowed-content utility classes (blue styles) are preserved during production builds

Analysis:
The fix is correct and necessary. In this pnpm monorepo, @uploadthing/react is linked via workspace:* protocol. The withUt helper from uploadthing/tw attempts to auto-detect UI package paths using require.resolve, but this can fail with workspace dependencies. The explicit path ensures Tailwind scans the compiled .js and .mjs files in the dist folder, where className strings are present.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a straightforward Tailwind configuration update that explicitly adds a content path to fix purged styles. The fix is well-understood, addresses a specific issue (docs: SSRDiff #1250), and follows Tailwind's documented approach for scanning node_modules. No logic changes or potential side effects.
  • No files require special attention

Important Files Changed

Filename Overview
docs/tailwind.config.ts Adds explicit content path for @uploadthing/react/dist to ensure Tailwind detects and preserves button and allowed-content classes during docs build

Last reviewed commit: 4315917

@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-uploadthing Ready Ready Preview, Comment Feb 26, 2026 7:44pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
legacy-docs-uploadthing Ignored Ignored Feb 26, 2026 7:44pm

Request Review

@markflorkowski markflorkowski merged commit 7da0134 into pingdotgg:main Feb 26, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: SSRDiff

2 participants