You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Api routes configured with {runtime: 'experimental-edge'} target "browser" exports during bundling.
Libraries that use conditional exports might want to export different code for server and client. Currently it seems there's no way to target the edge api routes specifically. For users this can result in build errors such as Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime for unwanted browser specific code.
Cloudflare workers via wrangler have the option of targetting the "worker" export.
Describe the solution you'd like
Provide a target which enables libraries to conditionally provide exports for the edge runtime. Potentially re-use the "worker" condition or a more fitting and unique condition.
Describe the feature you'd like to request
Api routes configured with
{runtime: 'experimental-edge'}
target"browser"
exports during bundling.Libraries that use conditional exports might want to export different code for server and client. Currently it seems there's no way to target the edge api routes specifically. For users this can result in build errors such as
Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime
for unwanted browser specific code.Cloudflare workers via wrangler have the option of targetting the
"worker"
export.Describe the solution you'd like
Provide a target which enables libraries to conditionally provide exports for the edge runtime. Potentially re-use the
"worker"
condition or a more fitting and unique condition.Describe alternatives you've considered
Don't see other options.
The text was updated successfully, but these errors were encountered: