Skip to content

build!: ship ESM and CommonJS builds - #8

Merged
devCrossNet merged 1 commit into
mainfrom
build/dual-esm-cjs
Oct 8, 2026
Merged

devCrossNet merged 1 commit into
mainfrom
build/dual-esm-cjs

Conversation

@devCrossNet

Copy link
Copy Markdown
Owner

What is accomplished by your PR?

  • tsc compiles to dist/esm (ES modules) and dist/cjs (CommonJS), no new build dependency
  • exports with nested import/require conditions, each with its own types
  • sideEffects: false for tree shaking

Tested with the packed package in an empty project: require, import, TypeScript with node16 and bundler resolution, deep imports are blocked.

Is there something controversial in your PR?

Stacked on #7 (feat/v1-core). GitHub changes the base to main when PR 1 is merged and its branch is deleted.

Checklist

  • Run unit tests to ensure all existing tests are still passing
  • Add new passing unit tests to cover the code introduced by your PR (no code changes)
  • Change documentation for the code introduced by your PR (separate PR)

🤖 Generated with Claude Code

@devCrossNet devCrossNet mentioned this pull request Oct 8, 2026
2 of 3 tasks
Base automatically changed from feat/v1-core to main October 8, 2026 18:50
- compile to dist/esm and dist/cjs with tsc, no new dependency
- add nested exports conditions with types for import and require
- mark the package as free of side effects

BREAKING CHANGE: the build output moved from dist to dist/esm and dist/cjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devCrossNet
devCrossNet merged commit 47ac2a8 into main Oct 8, 2026
2 checks passed
@devCrossNet
devCrossNet deleted the build/dual-esm-cjs branch October 8, 2026 18:53
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.

1 participant