triggerdotdev/trigger.dev

Missing export tasks from `@trigger.dev/sdk/v3`

Closed this issue · 2 comments

This is happening because of our new browser export condition that doesn't export some things that aren't compatible with browsers, but apparently this is effecting edge runtimes (I'm guessing that bundle with the "browser" custom condition but have not confirmed this.

We should export more from the browser export, especially the tasks export, but currently it's not so simple because it will pull in stuff that isn't compatible (opentelemetry).

Yup, looks like Cloudflare workers will bundle with the "browser" condition:

https://github.com/cloudflare/workers-sdk/blob/3ee1353d317c0e137a14f3091b32eecd575cc7a4/packages/wrangler/src/deployment-bundle/bundle.ts#L56

If we added a "workerd" or "worker" condition that exports the same as the "default" export then this would probably fix the issue for CF workers. I'm guessing we could do a similar thing for Vercel Edge functions