Skip to content

Commit 32ca994

Browse files
authored
Allow node.js compat on Cloudflare
Cloudflare provides some Node.js modules through node: prefix according to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ Without listing prefix as external bundler cannot resolve libraries and fails. This change allows usage of node: imports similarly to cloudflare: prefixed imports.
1 parent 87da73e commit 32ca994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/adapter-cloudflare/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default function (options = {}) {
5858
loader: {
5959
'.wasm': 'copy'
6060
},
61-
external: ['cloudflare:*']
61+
external: ['cloudflare:*', 'node:*']
6262
});
6363
}
6464
};

0 commit comments

Comments
 (0)