#101·theatre

Support both ESM and CJS modules

Author: AriaMinaeiCreated Mar 21, 2022Updated Nov 17, 2025
Labelsbuildnext release

This may be trickier than it looks. My first attempt at shipping .mjs and .cjs builds failed as it broke some build systems. For example, shipping an .mjs build with module mapping broke CRA, but not parcel.

Others seem to have similar issues as well: https://twitter.com/sebmarkbage/status/1498850329156329472 https://twitter.com/_rschristian/status/1498859530444320772 https://github.com/preactjs/preact/issues/3220#issuecomment-1038467450