@@ -7,7 +7,10 @@ await $`tsc`;
77const isDevelopment = Bun . env . NODE_ENV === "development" ;
88
99// Build all JavaScript/TypeScript files
10- function buildJs ( entrypoint : string , opts : Record < string , any > = { } ) {
10+ function buildJs (
11+ entrypoint : string ,
12+ opts : Partial < Parameters < ( typeof Bun ) [ "build" ] > [ 0 ] > = { } ,
13+ ) {
1114 return Bun . build ( {
1215 entrypoints : [ entrypoint ] ,
1316 outdir : "dist" ,
@@ -27,6 +30,10 @@ await Promise.all([
2730 outdir : "dist/src" ,
2831 external : [ "@modelcontextprotocol/sdk" ] ,
2932 } ) ,
33+ buildJs ( "src/app.ts" , {
34+ outdir : "dist/src" ,
35+ naming : { entry : "app-with-deps.js" } ,
36+ } ) ,
3037 buildJs ( "src/app-bridge.ts" , {
3138 outdir : "dist/src" ,
3239 external : [ "@modelcontextprotocol/sdk" ] ,
@@ -35,6 +42,11 @@ await Promise.all([
3542 outdir : "dist/src/react" ,
3643 external : [ "react" , "react-dom" , "@modelcontextprotocol/sdk" ] ,
3744 } ) ,
45+ buildJs ( "src/react/index.tsx" , {
46+ outdir : "dist/src/react" ,
47+ external : [ "react" , "react-dom" , "@modelcontextprotocol/sdk" ] ,
48+ naming : { entry : "react-with-deps.js" } ,
49+ } ) ,
3850 buildJs ( "src/server/index.ts" , {
3951 outdir : "dist/src/server" ,
4052 external : [ "@modelcontextprotocol/sdk" ] ,
0 commit comments