Skip to content

Ship ESM-only build - #7

Merged
0x80 merged 4 commits into
mainfrom
thijs/0408-komop
Apr 8, 2026
Merged

0x80 merged 4 commits into
mainfrom
thijs/0408-komop

Conversation

@0x80

@0x80 0x80 commented Apr 8, 2026 •

Copy link
Copy Markdown
Owner

Fixes #6

Drop CommonJS output and ship ESM only. The exports field now points at .mjs / .d.mts, the require condition is removed, and the build target is bumped to Node 22.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR switches the package to ESM-only distribution by removing CommonJS output and updating published entrypoints to target Node.js 22.

Changes:

  • Update tsdown build configuration to emit only ESM and target Node 22.
  • Update package.json entrypoints/exports to remove the require condition and point to ESM artifacts (.mjs / .d.mts).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tsdown.config.ts Drops CJS build output and bumps the compilation target to Node 22.
package.json Updates main, types, and exports to ESM-only entrypoints and removes the CJS require condition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
0x80 added 3 commits April 8, 2026 16:14
Drop CommonJS output from tsdown and point package exports at dist/index.mjs
and index.d.mts. Removes the require condition from exports.

Made-with: Cursor
@0x80
0x80 force-pushed the thijs/0408-komop branch from 353932e to c490c03 Compare April 8, 2026 14:17
@0x80
0x80 merged commit be001b8 into main Apr 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v2.3.0: ESM exports map points to non-existent dist/index.js (should be dist/index.mjs)

2 participants