import { createWorkerBuildOptions } from "https://deno.land/x/keywork@v6.2.1/bundling/esbuild/functions/createWorkerBuildOptions.ts";
ESBuild options for the Worker bundle.
The Worker runtime on Cloudflare Pages may differ from a standard Worker deployment.
If you're encountering runtime errors, consider adding the ReadableStream polyfill:
import esbuild from 'esbuild'
esbuild.build({
...workerBuildOptions,
inject: [require.resolve('keywork/polyfills/ReadableStream')],
})