Skip to content

fix deploying Cloudflare:sockets and cloudflare email workers #723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

franz101
Copy link

Based on #661

Copy link

changeset-bot bot commented Jun 10, 2025

⚠️ No Changeset found

Latest commit: 8172457

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -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:* :)

@vicb
Copy link
Contributor

vicb commented Jun 10, 2025

Thanks for the change, could you please add a patch changeset (using pnpm changeset)

Copy link

pkg-pr-new bot commented Jun 10, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/cloudflare@723

commit: 8172457

@franz101
Copy link
Author

Currently running issues, when running

import 'cloudflare:email' in an API file

Maybe I forgot server-only or could be related to the next config:
vercel/next.js#50177 (reply in thread)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants