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
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
* Implement `export_commonjs_default`/`export_commonjs_namespace` flags
Previously, the Workers runtime would incorrectly return
`{ default: module.exports }` from `require()`, as opposed to just
`module.exports`. The `export_commonjs_default` compatibility flag
enables the correct behaviour.
Miniflare previously implemented `export_commonjs_default` behaviour
for `CommonJS` modules, but `export_commonjs_namespace` behaviour for
all other types. This change switches everything to the correct
`export_commonjs_default` by default, but allows old behaviour to be
enabled by setting `export_commonjs_namespace`.
Note, importing `CommonJS` from an `ESModule` is not affected.
Ref: https://developers.cloudflare.com/workers/platform/compatibility-dates/#commonjs-modules-do-not-export-a-module-namespace
* fixup! Implement `export_commonjs_default`/`export_commonjs_namespace` flags
0 commit comments