seamapi / edgespec

☃️ an API framework for everywhere.
MIT License
5 stars 2 forks source link

Output CJS when bundling for edge runtime emulation #133

Closed codetheweb closed 6 months ago

codetheweb commented 6 months ago

The underlying Node.js VM API that the edge runtime package uses doesn't support ESM/modules. There's a new VM API that does support modules, but it's not stable yet and currently behind an experimental flag.

Hoping that bundling for CJS in dev and ESM for deployment won't lead to unexpected issues; if it does we can revisit this and add additional documentation and/or options.