Skip to content

fix: speed up docs build by switching to static output#890

Merged
christso merged 4 commits intomainfrom
fix/docs-static-build
Apr 1, 2026
Merged

fix: speed up docs build by switching to static output#890
christso merged 4 commits intomainfrom
fix/docs-static-build

Conversation

@christso
Copy link
Copy Markdown
Collaborator

@christso christso commented Apr 1, 2026

Summary

  • Switch docs site from SSR (output: 'server') to static build — reduces build time from timeout (~20min) to ~20 seconds
  • Remove unused @astrojs/cloudflare adapter and sharp dependencies from apps/web
  • Make @anthropic-ai/claude-agent-sdk an optional peer dependency (matching pi-coding-agent pattern) to fix pre-existing typecheck failure

Context

The Cloudflare Pages build was consistently timing out. The docs site never needed SSR — allagents.dev uses the same Starlight setup with static output and deploys fine. The SSR adapter added unnecessary build complexity and the monorepo install pulled in heavy unused deps like sharp.

The typecheck fix is included because it was blocking the pre-push hook on main.

Test plan

  • bun run --filter @agentv/web build completes in ~20s with output: "static"
  • Custom 404 page generates as static 404.html (served automatically by Cloudflare Pages)
  • bun --filter @agentv/core typecheck passes without claude-agent-sdk installed
  • All 1304 core tests pass
  • Verify Cloudflare Pages deployment succeeds after merge

🤖 Generated with Claude Code

christso and others added 3 commits April 1, 2026 01:15
Remove unnecessary server-side rendering setup that was slowing down
Cloudflare Pages builds. The docs site doesn't need SSR — static output
builds in ~20s vs timing out with the Cloudflare adapter.

- Remove @astrojs/cloudflare adapter and output: 'server'
- Remove unused sharp dependency (imageService was already 'passthrough')
- Custom 404 page continues to work via static 404.html

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move @anthropic-ai/claude-agent-sdk from dependencies to optional
peerDependencies, matching the pattern used by pi-coding-agent.
Add local type declaration so typecheck passes without the package
installed. The SDK is already lazy-loaded at runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 1, 2026

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8132bf1
Status: ✅  Deploy successful!
Preview URL: https://adef68aa.agentv.pages.dev
Branch Preview URL: https://fix-docs-static-build.agentv.pages.dev

View logs

Astro's default image service requires sharp. Since we removed it,
configure the noop service to pass images through without processing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@christso christso merged commit 8516d13 into main Apr 1, 2026
4 checks passed
@christso christso deleted the fix/docs-static-build branch April 1, 2026 01:58
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