Repository navigation
Ship ESM-only build - #7
Merged
Merged
Conversation
There was a problem hiding this comment.
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
tsdownbuild configuration to emit only ESM and target Node 22. - Update
package.jsonentrypoints/exports to remove therequirecondition 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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6
Drop CommonJS output and ship ESM only. The
exportsfield now points at.mjs/.d.mts, therequirecondition is removed, and the build target is bumped to Node 22.