Commit ced56f8
committed
fix(vite): bundle cli for npx runtime
Changed the build to target Node SSR instead of Vite’s default client/lib
pipeline, and stopped externalizing the TUI stack.
The relevant change is in `vite.config.mts:6: build.ssr = 'src/cli.ts'`,
a fixed `cli.js` entry name, and removal of `react`/`ink`/`@inkjs/ui`
from external.
That removes the emitted Rolldown fallback that was throwing
`Calling require for "react"` when the binary was launched via `npx`.
The new build no longer contains that runtime stub, and
`node dist/cli.js --help` now runs successfully.1 parent 5eaad8f commit ced56f8
1 file changed
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 8 | + | |
13 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
14 | 13 | | |
15 | | - | |
16 | 14 | | |
17 | | - | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
24 | | - | |
25 | 21 | | |
26 | 22 | | |
27 | 23 | | |
| |||
0 commit comments