🚧 This documentation is work in progress and for an unreleased version of Fresh.
Cloudflare Workers
Deploy Fresh to Cloudflare Workers by following these instructions:
- Run
deno install --allow-scripts npm:@cloudflare/vite-plugin npm:wrangler
- Add the cloudflare plugin in your vite configuration file:
import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
+ import { cloudflare } from "@cloudflare/vite-plugin";
export default defineConfig({
plugins: [
fresh(),
+ cloudflare(),
],
});
- Follow further instructions provided by the cloudflare vite plugin.
Check out the Cloudflare Documentation for further information.