Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cloudflare/src/cli/build/bundle-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
// Apply updater updates, must be the last plugin
updater.plugin,
] as Plugin[],
external: ["./middleware/handler.mjs"],
external: ["./middleware/handler.mjs", "cloudflare:sockets", "cloudflare:email"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Would cloudflare:* work here ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should, also should it have node:*?

Copy link
Contributor

@vicb vicb Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should, also should it have node:*?

That is taken care of by platform: "node",

But we should have tests for cloudflare:* :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would you do this test?
open-next build worker.ts?

import "cloudflare:email";

export async function handler({
    return {}
}

alias: {
// Note: it looks like node-fetch is actually not necessary for us, so we could replace it with an empty shim
// but just to be safe we replace it with a module that re-exports the native fetch
Expand Down