fix: speed up docs build by switching to static output#890
Merged
Conversation
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>
Deploying agentv with
|
| Latest commit: |
8132bf1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://adef68aa.agentv.pages.dev |
| Branch Preview URL: | https://fix-docs-static-build.agentv.pages.dev |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
output: 'server') to static build — reduces build time from timeout (~20min) to ~20 seconds@astrojs/cloudflareadapter andsharpdependencies fromapps/web@anthropic-ai/claude-agent-sdkan optional peer dependency (matchingpi-coding-agentpattern) to fix pre-existing typecheck failureContext
The Cloudflare Pages build was consistently timing out. The docs site never needed SSR —
allagents.devuses 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 likesharp.The typecheck fix is included because it was blocking the pre-push hook on
main.Test plan
bun run --filter @agentv/web buildcompletes in ~20s withoutput: "static"404.html(served automatically by Cloudflare Pages)bun --filter @agentv/core typecheckpasses withoutclaude-agent-sdkinstalled🤖 Generated with Claude Code