bd1e3e4a14
The createRequire approach from #10955 did not prevent the Bun ESM splitter from generating invalid output. Bun 1.3.14 with `conditions: ["browser"]` resolves @morphllm/morphsdk via the "import" condition (pre-split ESM barrel) even inside createRequire() calls, pulling in 52 chunk-*.js files that cause: SyntaxError: Exported binding 'G9' needs to refer to a top-level declared variable. Fix: add a morphsdkCjsPlugin in script/build.ts using Bun's onResolve API to redirect the module specifier to the absolute path of client.cjs before the ESM splitter is invoked. client.cjs is a self-contained ~2300-line CJS bundle with no chunk-*.js imports. morphsdk.ts is simplified to a plain re-export — the CJS redirection happens at build time, no source-level workaround needed.