import { type WorkersSiteStaticContentBinding } from "https://deno.land/x/keywork@v6.0.1/middleware/classes/mod.ts";
An environment binding available within Worker Sites.
This is often used with the @cloudflare/kv-asset-handler
package.
This binding only exists in Worker Sites.
Cloudflare Pages instead uses env.ASSETS
When using ESBuild, ensure that the virtual module __STATIC_CONTENT_MANIFEST
is marked as external:
import {build} from 'esbuild'
build({ external: ['__STATIC_CONTENT_MANIFEST']})
For usage with TypeScript, you'll need to define a module type as well:
// types/cloudflare-worker.d.ts
declare module '__STATIC_CONTENT_MANIFEST'
Properties
__STATIC_CONTENT: KVNamespace