Files
sweet/docs/canary/deployment/cloudflare-workers.md
T
2025-09-02 10:45:27 +02:00

729 B

description
description
Deploy Fresh on Cloudflare Workers

Deploy Fresh to Cloudflare Workers by following these instructions:

  1. Run deno install --allow-scripts npm:@cloudflare/vite-plugin npm:wrangler
  2. 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(),
    ],
  });
  1. Follow further instructions provided by the cloudflare vite plugin.

Check out the Cloudflare Documentation for further information.