Skip to content

Commit 5e2395f

Browse files
committed
fix: bundle ink-spinner to prevent React version mismatch on global install
1 parent 8060fc9 commit 5e2395f

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
],
1414
"scripts": {
1515
"go": "bun run build && ./install-local.sh && echo \"COMPLETED\"",
16-
"build": "tsup src/index.ts --format esm,cjs --dts",
16+
"build": "tsup",
1717
"dev": "bun src/index.ts",
1818
"typecheck": "tsc --noEmit",
1919
"lint": "eslint .",

tsup.config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig } from 'tsup';
2+
3+
export default defineConfig({
4+
entry: ['src/index.ts'],
5+
format: ['esm', 'cjs'],
6+
dts: true,
7+
splitting: true,
8+
clean: true,
9+
target: 'node18',
10+
// Keep these external to avoid bundling issues
11+
external: [
12+
'react-devtools-core',
13+
],
14+
// Ensure ink-spinner uses the same React as ink
15+
noExternal: [
16+
'ink-spinner',
17+
],
18+
});

0 commit comments

Comments
 (0)