Skip to main content
Module

x/keywork/middleware/classes/mod.ts>WorkersSiteStaticContentBinding

A library for building V8 Isolate web apps on Cloudflare Workers, Deno, and Node.JS
Go to Latest
interface WorkersSiteStaticContentBinding
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