diff --git a/src/presets/cloudflare.ts b/src/presets/cloudflare.ts index 939c542c..ff5b4443 100644 --- a/src/presets/cloudflare.ts +++ b/src/presets/cloudflare.ts @@ -24,7 +24,6 @@ const cloudflareNodeCompatModules = [ "string_decoder", "url", "util/types", - "sys", "zlib", ]; @@ -49,6 +48,11 @@ const cloudflarePreset: Preset = { ]), ), + // The `node:sys` module is just a deprecated alias for `node:util` + // Keep this until util is a full compat module. + sys: "unenv/runtime/node/util/$cloudflare", + "node:sys": "unenv/runtime/node/util/$cloudflare", + // define aliases for hybrid modules ...Object.fromEntries( hybridNodeCompatModules.flatMap((m) => [