Skip to content

DEV: Export JS client as CommonJS module - #390

Merged
davidtaylorhq merged 1 commit into
mainfrom
esm-commonjs-export
Aug 3, 2026
Merged

davidtaylorhq merged 1 commit into
mainfrom
esm-commonjs-export

Conversation

@davidtaylorhq

Copy link
Copy Markdown
Member

The client's UMD wrapper only handled AMD and browser-globals, so bundlers (webpack, rolldown, etc.) and ESM projects couldn't import it.

This commit makes the minimum change for it to be importable from those contexts. Also removes the incorrect module/jsnext fields from package.json.

In future we may explore making it a properly native ESModule.

The client's UMD wrapper only handled AMD and browser-globals, so bundlers (webpack, rolldown, etc.) and ESM projects couldn't `import` it.

This commit makes the minimum change for it to be importable from those contexts. Also removes the incorrect `module`/`jsnext` fields from package.json.

In future we may explore making it a properly native ESModule.
@davidtaylorhq
davidtaylorhq requested a review from cvx August 3, 2026 16:50
@davidtaylorhq
davidtaylorhq merged commit 35ff7f4 into main Aug 3, 2026
14 checks passed
@davidtaylorhq
davidtaylorhq deleted the esm-commonjs-export branch August 3, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants