@avedon/adapter-static
v6.0.1
Published
Fail-closed static export for Avedon. Writes only `build/client` (hashed assets + SSG HTML). Deploy that folder to Cloudflare Pages, Netlify, GitHub Pages, S3/CDN, etc.
Readme
@avedon/adapter-static
Fail-closed static export for Avedon. Writes only build/client (hashed assets + SSG HTML). Deploy that folder to Cloudflare Pages, Netlify, GitHub Pages, S3/CDN, etc.
Config
import { staticAdapter } from '@avedon/adapter-static'
export default {
adapter: staticAdapter({
out: 'build',
notFoundHtml: true,
redirects: 'cloudflare',
}),
}Requirements
Every route must use render: 'ssg' (with getStaticPaths / entries for param routes). The build fails if any route uses SSR/CSR, form actions, api / api_*, or revalidate.
Optional:
notFoundHtml: true | string— writeclient/404.htmlredirects: 'cloudflare'— emit a stubclient/_redirectswhen the app did not already provide one viapublic/
Deploy
pnpm build
# upload ./build/clientExample (Cloudflare Pages):
wrangler pages deploy ./build/client --project-name=my-app