Files
website-enchun-mgr/.opencode/skills/astro-cloudflare-deploy/assets/astro.config.hybrid.mjs
pkupuk ad8e2e313e chore(agent): configure AI agents and tools
Add configuration for BMad, Claude, OpenCode, and other AI agent tools and workflows.
2026-02-11 11:51:23 +08:00

41 lines
983 B
JavaScript

// Hybrid rendering configuration - Recommended for most projects
// Static pages by default, SSR where needed with `export const prerender = false`
import { defineConfig } from 'astro/config';
import cloudflare from '@astrojs/cloudflare';
export default defineConfig({
output: 'hybrid',
adapter: cloudflare({
// Mode: 'directory' (default) = separate function per route
// 'standalone' = single worker for all routes
mode: 'directory',
// Image service: 'passthrough' (default) or 'compile'
imageService: 'passthrough',
// Platform proxy for local development with Cloudflare bindings
platformProxy: {
enabled: true,
configPath: './wrangler.jsonc',
},
}),
// Optional: Add integrations
// integrations: [
// tailwind(),
// react(),
// sitemap(),
// ],
vite: {
build: {
chunkSizeWarningLimit: 1000,
},
},
});
// Usage: Add to pages that need SSR:
// export const prerender = false;