Skip to content

v0.2.3 — preserve author-specified export condition order

Choose a tag to compare

@brainkim brainkim released this 25 Jul 16:48
· 72 commits to main since this release

Fixed

  • User-authored export condition order not preserved — Condition order is spec-significant (Node and bundlers match conditions top to bottom, first wins), but the exports generator reordered merged export objects: a custom condition the author placed before import/require (e.g. browser) came out after import, making it dead code for ESM bundlers. Expanding/filling an existing export now preserves the author's relative order; fabricated conditions slot in around it (types first, default kept last).