* chore: remove dead ./react-with-deps export (copy-paste bug from #221)
The react-with-deps build entry was introduced in PR #221 (e078250a) as a
sibling to app-with-deps for CDN/unpkg no-bundler use. But its external
array was duplicated without editing — it never dropped @modelcontextprotocol/sdk
from externals, so it has shipped byte-identical to ./react for 10 releases
(v0.3.1 → v1.2.0).
After #534 merged, both entries use ['react', 'react-dom', ...PEER_EXTERNALS]
— still identical, just smaller.
Delete rather than fix: React apps always use a bundler; the CDN/unpkg
use case (HTML-string apps like qr-server) doesn't apply to React hooks.
Zero consumers verified (examples/docs/tests/plugins).
* fix: bundle SDK+zod in react-with-deps (keep React external)
Reverts the deletion from the previous commit and applies the actual fix.
The react-with-deps external array was copy-pasted in PR #221 without
dropping PEER_EXTERNALS — now it mirrors app-with-deps: bundles
@modelcontextprotocol/sdk + zod for CDN/import-map consumers.
React and react-dom MUST remain external — bundling them would cause
dual-React-instance hooks errors. Consumer provides them via import map.
Before: index.js 26KB == react-with-deps.js 26KB (identical MD5)
After: index.js 26KB != react-with-deps.js 323KB (SDK+zod bundled)
Two packaging bugs:
1. The './schema.json' export pointed to dist/src/generated/schema.json
but nothing copied it there (tsc is emitDeclarationOnly, Bun.build
doesn't emit JSON). Consumers got ERR_MODULE_NOT_FOUND.
Fix: cpSync after tsc runs.
2. zod is a peerDependency but was bundled into every entry point
(~270KB each). This causes dual-instance bugs where consumer-side
'instanceof ZodError' and schema.extend() break across boundaries.
Fix: add zod to external list for all non-with-deps entries.
Bundle size impact:
app.js 293952 -> 24561 (-91.6%)
app-bridge.js 299517 -> 30112 (-89.9%)
react/index.js 295558 -> 26153 (-91.2%)
server/index.js 291500 -> 22135 (-92.4%)
app-with-deps 321814 -> 321814 (unchanged, intentional)
* feat: make MCP SDK a peer dependency
- Move @modelcontextprotocol/sdk from dependencies to peerDependencies (^1.20.0)
- Add to devDependencies for local development (^1.24.3)
- Externalize SDK from all build entry points (app, app-bridge, react, server)
Benefits:
- Consumers control their SDK version
- Deduplication when consumer already has SDK
- Follows pattern of react/zod peer deps
* fix: require SDK ^1.24.0 for Zod 4 compatibility
Earlier SDK versions have Zod type incompatibilities that cause build errors.
* chore: update examples to SDK ^1.24.0 to match peer dep