fix deploying Cloudflare:sockets and cloudflare email workers#723
fix deploying Cloudflare:sockets and cloudflare email workers#723franz101 wants to merge 3 commits intoopennextjs:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 7c25c83 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| updater.plugin, | ||
| ] as Plugin[], | ||
| external: ["./middleware/handler.mjs"], | ||
| external: ["./middleware/handler.mjs", "cloudflare:sockets", "cloudflare:email"], |
There was a problem hiding this comment.
Thanks!
Would cloudflare:* work here ?
There was a problem hiding this comment.
Yes, it should, also should it have node:*?
There was a problem hiding this comment.
Yes, it should, also should it have
node:*?
That is taken care of by platform: "node",
But we should have tests for cloudflare:* :)
There was a problem hiding this comment.
how would you do this test?
open-next build worker.ts?
import "cloudflare:email";
export async function handler({
return {}
}
|
Thanks for the change, could you please add a patch changeset (using |
commit: |
|
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: |
|
need some support. it looks like opennext just bundles it into the following: |
|
What if you add it to |
Same error: |
|
ok I was able to run it locally. based on this: |
|
Requires this plugin: |
|
how would you design the test? it needs to be run with wrangler dev afaik |
|
See https://github.com/opennextjs/opennextjs-cloudflare/blob/main/examples/playground15/app/api/cloudflare/route.ts for an example of using |
Based on #661