←Back to Blog
Building with Astro 6 and Cloudflare
A quick guide on how to set up Astro 6 for an optimized deployment on Cloudflare Pages.
Juan Alfaro
~5 min read
The Future of the Web with Astro 6
Astro 6 has arrived with significant changes, especially in how it interacts with deployment adapters.
What's new?
- Vite 7: A faster, more efficient build engine.
- Content Layer: A unified way to manage content from any source.
- Better Cloudflare Support: We can now use workerd in development.
Adapter Configuration
To use the Cloudflare adapter in directory mode (recommended), you just need:
import { defineConfig } from 'astro/config';
import cloudflare from '@astrojs/cloudflare';
export default defineConfig({
output: 'server',
adapter: cloudflare({
mode: 'directory'
})
});
This portfolio is a perfect example of how these technologies can be combined to create a premium experience.