Skip to content

Commit

Permalink
fix(cloudflare): alias node:sys to node:util (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig authored Oct 28, 2024
1 parent 851ba33 commit 140f0b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/presets/cloudflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const cloudflareNodeCompatModules = [
"string_decoder",
"url",
"util/types",
"sys",
"zlib",
];

Expand All @@ -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) => [
Expand Down

0 comments on commit 140f0b6

Please sign in to comment.