Skip to content

Commit 1bf71d0

Browse files
committed
rfc: link runnable reproduction, sync real outputs, drop workspace-root defaultPackage note
1 parent 2c7d8b4 commit 1bf71d0

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

rfcs/monorepo-app-commands.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ Pack's positional means entry files/globs (`packages/cli/src/pack-bin.ts`) and i
3838

3939
```
4040
$ vp pack packages/ui
41-
✗ Error: cannot resolve entry: packages/ui
41+
ℹ entry: packages/ui
42+
ℹ Build start
43+
error: Build failed with 1 error:
44+
45+
[UNRESOLVED_ENTRY] Cannot resolve entry module packages/ui.
4246
```
4347

4448
Directory targeting exists only via `--root` / `-W` / `-F`, inconsistent with `vp dev <path>`.
@@ -65,6 +69,8 @@ Error: ENOENT: no such file or directory, open '/acme/certs/dev.pem'
6569

6670
Calling `process.chdir()` in the CLI process would close the gap but is a global mutation that leaks into everything sharing the process. The way out: `vp` never runs Vite or tsdown in-process; the NAPI binding always spawns a fresh child (`packages/cli/binding/src/cli/execution.rs`), so setting the child's spawn cwd achieves full equivalence with no `process.chdir()` and no upstream change.
6771

72+
All of the failures above are reproducible with `vite-plus@0.2.2`: https://github.com/why-reproductions-are-required/vite-plus-monorepo-app-commands-repro
73+
6874
## Proposed UX
6975

7076
Example workspace used throughout:
@@ -201,7 +207,7 @@ vp dev: using ./frontend (defaultPackage)
201207
➜ Local: http://localhost:5173/
202208
```
203209

204-
An explicit path still wins: `vp dev apps/admin` ignores `defaultPackage`. The same key works at a JS workspace root to skip the picker for one blessed app; there `vite-plus` is installed and the usual typed `import { defineConfig } from 'vite-plus'` form applies.
210+
An explicit path still wins: `vp dev apps/admin` ignores `defaultPackage`.
205211

206212
### 5. Inside a sub-package: nothing changes
207213

0 commit comments

Comments
 (0)