Shadcn Cleanup Record
Complete cleanup record of the project migration from shadcn to HeroUI
Shadcn Cleanup Record
The project has migrated from shadcn to HeroUI. Below is the complete cleanup content.
1. packages/ui — Remove the shadcn component package
Deleted file structure
Retained files
| Path | Description |
|---|---|
src/styles/globals.css | Contains only @import "tailwindcss" + HeroUI style imports |
src/index.ts | Empty file, allows tsc to pass |
Removed dependencies
Removed from packages/ui/package.json:
shadcn, @base-ui/react, class-variance-authority, clsx,
tailwind-merge, lucide-react, sonner, tw-animate-css, next-themeslucide-react was removed from packages/ui only because this package no longer contains component files. It is still retained in apps/web/package.json (used by loader.tsx), and the HeroUI ecosystem may also use it later, so it is not deleted.
2. apps/web — Remove pages and components using shadcn
Deleted file structure
Retained files
| Path | Description |
|---|---|
src/components/area-chart-demo.tsx | Uses HeroUI Pro, unaffected |
src/components/loader.tsx | Uses only lucide-react, unaffected |
src/routes/index.tsx | Home page, references area-chart-demo |
__root.tsx changes
| Action | Content |
|---|---|
| Removed | Toaster (sonner), ThemeProvider (next-themes), Header, trpc type references |
| Retained | HeadContent, Outlet, TanStackRouterDevtools, ReactQueryDevtools |
utils/trpc.ts changes
toast.error(...) replaced with console.error(...), a temporary replacement after removing sonner.
Removed dependencies
Removed from apps/web/package.json:
sonner, next-themes, embla-carousel, embla-carousel-react, tailwind-merge3. Root directory — Clean up the catalog
next-themes: "^0.4.6" was removed from the workspaces.catalog in package.json. The entire monorepo no longer references it.
What is a catalog? A centralized version management mechanism for Bun workspaces. Sub-packages reference declared versions using "catalog:" to avoid repeating them. It is only removed from the catalog when no one in the entire monorepo uses it.
4. Configuration cleanup
| File | Change |
|---|---|
packages/ui/tsconfig.json | Removed @my-better-t-app/ui/* path mapping |
apps/web/tsconfig.json | Removed @my-better-t-app/ui/* path mapping, retained @/* |
apps/web/components.json | Deleted |
5. Verification
Install dependencies
bun installBuild verification
vite buildConfirm no leftovers
grep -rn "shadcn\|@my-better-t-app/ui/components\|next-themes\|sonner" \
apps/web/src/ packages/ui/src/
# Returns emptyHow is this guide?
Last updated on