Skip to content

Add ESM package exports with conditional imports#566

Closed
franco-zalamena-iterable wants to merge 1 commit intoIterable:mainfrom
franco-zalamena-iterable:feat/488-esm-package-exports
Closed

Add ESM package exports with conditional imports#566
franco-zalamena-iterable wants to merge 1 commit intoIterable:mainfrom
franco-zalamena-iterable:feat/488-esm-package-exports

Conversation

@franco-zalamena-iterable
Copy link
Copy Markdown

@franco-zalamena-iterable franco-zalamena-iterable commented Apr 7, 2026

Summary

  • Add ESM build via tsconfig.esm.json
  • Add conditional exports in package.json for import/require
  • Add module field pointing to ESM entry

Test plan

  • ESM build produces valid ES modules
  • Existing require() still resolves correctly
  • import {} from '@iterable/web-sdk' resolves to ESM

🤖 Generated with Claude Code

Add tsconfig.esm.json for ES module builds and configure package.json
with conditional exports so that import resolves to ESM and require
continues to resolve to the existing CommonJS output.

Fixes Iterable#488

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@franco-zalamena-iterable franco-zalamena-iterable deleted the feat/488-esm-package-exports branch April 8, 2026 14:47
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