From 75aada8f57af5e53cf32ddb81dc2d56ea9c11f83 Mon Sep 17 00:00:00 2001 From: Silvan Gehrig <38138071+Sillyvan@users.noreply.github.com> Date: Wed, 24 Dec 2025 15:29:03 +0100 Subject: [PATCH] update docs to account for fs support in cloudflare workers --- docs/integrations/cloudflare-worker.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/integrations/cloudflare-worker.md b/docs/integrations/cloudflare-worker.md index adc0ab14..6f77a71e 100644 --- a/docs/integrations/cloudflare-worker.md +++ b/docs/integrations/cloudflare-worker.md @@ -65,7 +65,7 @@ wrangler dev This should start a development server at `http://localhost:8787` -You don't need a `nodejs_compat` flag as Elysia doesn't use any Node.js built-in modules (or the ones we use don't support Cloudflare Worker yet). +You don't need a `nodejs_compat` flag for basic usage. However, if you want to use [OpenAPI Type Gen](/blog/openapi-type-gen), you'll need to enable it with compatibility_date 2025-09-01 or later. ### pnpm If you use pnpm, [pnpm doesn't auto install peer dependencies by default](https://github.com/orgs/pnpm/discussions/3995#discussioncomment-1893230) forcing you to install additional dependencies manually. @@ -76,8 +76,8 @@ pnpm add @sinclair/typebox openapi-types ## Limitations Here are some known limitations of using Elysia on Cloudflare Worker: -1. `Elysia.file`, and [Static Plugin](/plugins/static) doesn't work [due to the lack of `fs` module](https://developers.cloudflare.com/workers/runtime-apis/nodejs/#supported-nodejs-apis), see [static file](#static-file) section for alternative -2. [OpenAPI Type Gen](/blog/openapi-type-gen) doesn't work [due to the lack of `fs` module](https://developers.cloudflare.com/workers/runtime-apis/nodejs/#supported-nodejs-apis) +1. `Elysia.file`, and [Static Plugin](/plugins/static) doesn't work, see [static file](#static-file) section for Cloudflare's built-in alternative +2. [OpenAPI Type Gen](/blog/openapi-type-gen) requires `nodejs_compat` flag enabled in wrangler config (compatibility_date 2025-09-01 or later) 3. You can't define [**Response** before server start](https://x.com/saltyAom/status/1966602691754553832) or use plugin that does so 4. You can't inline a value due to 3.