Skip to content

fix(docs): build workspace packages before docs#344

Merged
antfu merged 1 commit into
mainfrom
antfu/create-pr-v2
May 14, 2026
Merged

fix(docs): build workspace packages before docs#344
antfu merged 1 commit into
mainfrom
antfu/create-pr-v2

Conversation

@antfu
Copy link
Copy Markdown
Member

@antfu antfu commented May 14, 2026

Description

pnpm docs:build was failing with TS2307: Cannot find module '@vitejs/devtools' because twoslash resolves the package's types field (dist/index.d.ts) — which doesn't exist until the workspace packages have been built. Chaining pnpm build (turbo-cached, so it's a no-op when nothing changed) before the docs build makes pnpm docs:build self-sufficient from a fresh clone or after cleaning dist/.

Linked Issues

Additional context

Twoslash resolves `@vitejs/devtools*` imports via the package's `types`
field, which points at `dist/index.d.ts`. Without a prior `pnpm build`,
those files don't exist and `vitepress build` fails with TS2307.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 14, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/devtools@344
npm i https://pkg.pr.new/@vitejs/devtools-kit@344
npm i https://pkg.pr.new/@vitejs/devtools-rolldown@344
npm i https://pkg.pr.new/@vitejs/devtools-self-inspect@344

commit: 626151e

@antfu antfu merged commit 3f460d2 into main May 14, 2026
10 checks passed
@antfu antfu deleted the antfu/create-pr-v2 branch May 14, 2026 07:53
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.

1 participant