Skip to content

fix(cli): allow esbuild builds in Vite templates#10659

Open
raashish1601 wants to merge 1 commit into
shadcn-ui:mainfrom
raashish1601:codex/10658-vite-pnpm-esbuild-builds
Open

fix(cli): allow esbuild builds in Vite templates#10659
raashish1601 wants to merge 1 commit into
shadcn-ui:mainfrom
raashish1601:codex/10658-vite-pnpm-esbuild-builds

Conversation

@raashish1601
Copy link
Copy Markdown

Summary

Fixes #10658.

  • Add pnpm allowBuilds.esbuild config to the Vite app and Vite monorepo templates so pnpm 11 can run esbuild's postinstall during the first install.
  • Update template scaffold conversion so npm/bun/yarn remove pnpm-only workspace config without treating a single-app template as a monorepo.
  • Keep the existing monorepo conversion behavior for real packages: workspace entries.

Validation

  • corepack pnpm --filter=shadcn exec vitest run src/utils/scaffold.test.ts
  • corepack pnpm --filter=shadcn typecheck
  • corepack pnpm --filter=shadcn build
  • corepack pnpm exec prettier --check --end-of-line lf templates/vite-app/pnpm-workspace.yaml templates/vite-monorepo/pnpm-workspace.yaml packages/shadcn/src/templates/create-template.ts packages/shadcn/src/utils/scaffold.test.ts
  • git diff --check
  • Temporary copy of templates/vite-app: corepack pnpm@11.1.2 install --no-frozen-lockfile --dir <tmp>; esbuild postinstall ran and no ignored-build-script output was reported.
  • Temporary copy of templates/vite-monorepo: corepack pnpm install --no-frozen-lockfile --dir <tmp>; pinned pnpm 9.15.9 install completed and no ignored-build-script output was reported.

Notes

  • corepack pnpm --filter=shadcn test was also run on Windows. The full suite currently has unrelated Windows path/local-file failures in tests such as migrate-radix, env-helpers, registry/api, registry/resolver, and update-files; the scaffold test covering this change passes.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 15, 2026

@raashish1601 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: shadcn init fails on Vite template due to blocked esbuild build script [ERR_PNPM_IGNORED_BUILDS]

1 participant