CollectUICollectUI

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

components.json

Retained files

PathDescription
src/styles/globals.cssContains only @import "tailwindcss" + HeroUI style imports
src/index.tsEmpty 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-themes

lucide-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

components.json

Retained files

PathDescription
src/components/area-chart-demo.tsxUses HeroUI Pro, unaffected
src/components/loader.tsxUses only lucide-react, unaffected
src/routes/index.tsxHome page, references area-chart-demo

__root.tsx changes

ActionContent
RemovedToaster (sonner), ThemeProvider (next-themes), Header, trpc type references
RetainedHeadContent, 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-merge

3. 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

FileChange
packages/ui/tsconfig.jsonRemoved @my-better-t-app/ui/* path mapping
apps/web/tsconfig.jsonRemoved @my-better-t-app/ui/* path mapping, retained @/*
apps/web/components.jsonDeleted

5. Verification

Confirm no leftovers

grep -rn "shadcn\|@my-better-t-app/ui/components\|next-themes\|sonner" \
  apps/web/src/ packages/ui/src/
# Returns empty

How is this guide?

Last updated on

On this page