Skip to content

Commit

Permalink
Allow node.js compat on Cloudflare
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yaroslavros authored Dec 18, 2023
1 parent 87da73e commit 32ca994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function (options = {}) {
loader: {
'.wasm': 'copy'
},
external: ['cloudflare:*']
external: ['cloudflare:*', 'node:*']
});
}
};
Expand Down

0 comments on commit 32ca994

Please sign in to comment.