Commit 2b10490
fix: emit CJS build so require('@mcp-ui/client') exposes exports (#211)
The require condition and main field pointed at dist/index.js, a UMD
bundle. Because package.json has "type": "module", Node parses .js as
ESM, so the UMD wrapper's exports check never fires and require()
returns an empty object (reproduces on published 7.1.1).
Add a cjs build output at dist/index.cjs (mirroring @mcp-ui/server) and
point main/exports.require at it. The UMD bundle stays at dist/index.js
for script-tag/CDN consumers.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent b8f2d4a commit 2b10490
2 files changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | | - | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
0 commit comments