Commit 4d678df
fix(cli) use vp fmt instead of bin in create (#972)
`vp create` was formatting newly scaffolded projects by invoking `oxfmt`
directly instead of going through vp fmt. I
n Yarn PnP projects, that bypassed Vite+'s normal config resolution
path, so oxfmt failed to load the generated vite.config.ts
The fix changes the formatting step to call `vp fmt --write` instead of
executing `oxfmt` directly.
```shell
$> vp create --verbose
...
Wrote editor config to .vscode/settings.json
Wrote editor config to .vscode/extensions.json
Rewrote imports in one file
synth-tools/vite.config.ts
✔ Merged staged config into synth-tools/vite.config.ts
✔ Git hooks configured
◇ Dependencies installed
◇ Format failed
Failed to load configuration file.
/Users/USER/workspace/perso/projects/web/synth-tools/vite.config.ts
Ensure the file has a valid default export of a JSON-serializable configuration object.
You may need to run "vp fmt --write" manually in /Users/User/workspace/perso/projects/web/synth-tools
◇ Scaffolded synth-tools with Vite+ monorepo
• Node 24.14.0 yarn 4.12.0
✓ Dependencies installed in 2.7s
→ Next: cd synth-tools && vp dev apps/website
```
Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>1 parent 69f551a commit 4d678df
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
112 | | - | |
113 | 111 | | |
114 | | - | |
115 | | - | |
| 112 | + | |
| 113 | + | |
116 | 114 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 115 | + | |
121 | 116 | | |
122 | 117 | | |
123 | 118 | | |
| |||
0 commit comments