fix: stub react-devtools-core for bun compile
Ink statically imports react-devtools-core (only used when DEV=true). With --external, bun compile leaves a runtime require that fails in the standalone binary. Instead, provide a no-op stub that bun bundles inline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,14 @@ pnpm build
|
||||
echo "==> Bundling standalone binaries..."
|
||||
mkdir -p dist
|
||||
rm -f dist/mcpctl dist/mcpctl-local dist/mcpctl-*.rpm
|
||||
bun build src/cli/src/index.ts --compile --outfile dist/mcpctl --external react-devtools-core
|
||||
|
||||
# Ink optionally imports react-devtools-core which isn't installed.
|
||||
# Provide a no-op stub so bun can bundle it (it's only invoked when DEV=true).
|
||||
if [ ! -e node_modules/react-devtools-core ]; then
|
||||
ln -s ../src/cli/stubs/react-devtools-core node_modules/react-devtools-core
|
||||
fi
|
||||
|
||||
bun build src/cli/src/index.ts --compile --outfile dist/mcpctl
|
||||
bun build src/mcplocal/src/main.ts --compile --outfile dist/mcpctl-local
|
||||
|
||||
echo "==> Packaging RPM..."
|
||||
|
||||
Reference in New Issue
Block a user