Effect CommunityEC
Effect Community2y ago
24 replies
whatplan

Request to Remove `new Function` Usage in `@effect/platform` for Vercel Edge Compatibility

is it possible for @effect/platform to remove its dependencies on find-my-way-ts and multipasta or to at least adjust those packages so they do not use new Function (maybe a separate version which has slightly less performance but doesnt use it)?

the reason being you can not use new Function (or eval) in the vercel edge runtime- it wont even let you build it
I am currently using the @effect/platform stuff in the edge-only middleware and wrapping the whole thing in Http.app.toWeb which has been great until I ran into this issue

I had to resort to patching out the import to multipasta and all form and multipart related functions in Http/ServerRequest to get things to build

I think the vercel edge runtime is a widely enough used platform that we should make our best effort to support it
Was this page helpful?