fix(cli): mark react-devtools-core external in bun compile
ink@6 has a devtools.js module that imports react-devtools-core. It is only loaded at runtime when DEV=true, but Bun's static bundler still tries to resolve it at compile time and fails with "Could not resolve". Marking it external lets the compile succeed; the dynamic import path is never taken in production. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -338,6 +338,10 @@ function compileBinary(outFile: string, target: string, isCrossCompile: boolean)
|
||||
target,
|
||||
"--minify",
|
||||
"--conditions=source",
|
||||
// ink imports react-devtools-core dynamically only when DEV=true; mark
|
||||
// external so Bun's static bundler doesn't try to resolve it at compile.
|
||||
"--external",
|
||||
"react-devtools-core",
|
||||
],
|
||||
cwd: workspaceRoot,
|
||||
stdout: "inherit",
|
||||
|
||||
Reference in New Issue
Block a user