81104a9335
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
CHANGELOG.md | ||
package.json | ||
README.md | ||
tsconfig.json |
@astrojs/cloudflare
An SSR adapter for use with Cloudflare Pages Functions targets. Write your code in Astro/Node and deploy to Cloudflare Pages.
In your astro.config.mjs use:
import { defineConfig } from 'astro/config';
import cloudflare from '@astrojs/cloudflare';
export default defineConfig({
adapter: cloudflare()
});
Enabling Preview
In order for preview to work you must install wrangler
$ pnpm install wrangler --save-dev
It's then possible to update the preview script in your package.json
to "preview": "wrangler pages dev ./dist"