void 0.10.5 → 0.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/dist/agents-Bmr5tFFb.mjs +1454 -0
  2. package/dist/{auth-cmd-UoCwfDQv.mjs → auth-cmd-DlgNwByu.mjs} +10 -10
  3. package/dist/{better-auth-shared-D0Mbmx5V.mjs → better-auth-shared-BQooDxbw.mjs} +1 -1
  4. package/dist/{better-auth-shared-jkksALri.d.mts → better-auth-shared-BvnM9px6.d.mts} +2 -2
  5. package/dist/{build-cmd-CVyuBHjP.mjs → build-cmd-Br8qL0rA.mjs} +15 -17
  6. package/dist/{cache-ACORQCIq.mjs → cache-wH-mP8UE.mjs} +10 -12
  7. package/dist/{cancel-deploy-Gi8zmoZC.mjs → cancel-deploy-BEBOEgtu.mjs} +16 -18
  8. package/dist/cli/cli.mjs +47 -49
  9. package/dist/{client-BlbnA92X.mjs → client-Cj96iiBH.mjs} +74 -8
  10. package/dist/{config-8dLIngKW.mjs → config-1twldYCW.mjs} +10 -10
  11. package/dist/{config-CbJS4Krx.mjs → config-BdUctCZD.mjs} +4 -4
  12. package/dist/{create-project-LjvkYziS.mjs → create-project-DD9n8Ho-.mjs} +28 -23
  13. package/dist/{db-C00yjN01.mjs → db-DjKE2-A-.mjs} +147 -149
  14. package/dist/{delete-CplfvTgU.mjs → delete-D2kr3Kmk.mjs} +13 -15
  15. package/dist/{deploy-CISNL5uK.mjs → deploy-C4PbkFyE.mjs} +97 -100
  16. package/dist/{discover-ZWuBvt22.mjs → discover-BuVVSAum.mjs} +3 -3
  17. package/dist/{dist-5cGIJHQQ.mjs → dist-BuiRJkTd.mjs} +59 -27
  18. package/dist/{domain-B4HpcgNG.mjs → domain-_luIsM_B.mjs} +14 -16
  19. package/dist/{env-DNMJpeVF.mjs → env-CO5XAS9t.mjs} +23 -25
  20. package/dist/{env-helpers-B_ks681T.d.mts → env-helpers-z4stu8uc.d.mts} +1 -1
  21. package/dist/{env-types-BS8cZead.mjs → env-types-D51bnR-c.mjs} +3 -3
  22. package/dist/{env-validation-BxbtBbjh.mjs → env-validation-CeC2FL66.mjs} +4 -4
  23. package/dist/{fetch-error-C6qffTl2.mjs → fetch-error-Dj3crt0e.mjs} +3 -3
  24. package/dist/{gen-C0pV2gRQ.mjs → gen-Cf79J4aw.mjs} +42 -44
  25. package/dist/{github-cmd-CwtLD1yI.mjs → github-cmd-DnqxyOsb.mjs} +88 -90
  26. package/dist/{handler-B7rCOy21.d.mts → handler-imD0UVDT.d.mts} +4 -5
  27. package/dist/{headers-BNWymgnH.mjs → headers-BwvFGhkx.mjs} +3 -3
  28. package/dist/index.d.mts +3 -3
  29. package/dist/index.mjs +102 -83
  30. package/dist/{init-D58GxCtt.mjs → init-KirOzVDs.mjs} +132 -134
  31. package/dist/link-CUmiosyb.mjs +45 -0
  32. package/dist/{list-CbNNjXTm.mjs → list-3GEw7b6m.mjs} +10 -12
  33. package/dist/{login-CvxxF_9z.mjs → login-DJReaT_Q.mjs} +14 -15
  34. package/dist/{logs-BDZ9AuhM.mjs → logs-D-rQ56Lq.mjs} +9 -11
  35. package/dist/{magic-string.es-C1Fb0uxq.mjs → magic-string.es-ZQjdJFFn.mjs} +3 -3
  36. package/dist/{mcp-C8BjRt_z.mjs → mcp-D7yc0dXY.mjs} +2 -3
  37. package/dist/{node-B07cZs0d.mjs → node-yFFk626c.mjs} +6 -6
  38. package/dist/{package-json-Bg_GJdJB.mjs → package-json-B0NuUWGd.mjs} +1 -1
  39. package/dist/pages/client.d.mts +1 -1
  40. package/dist/pages/client.mjs +2 -1
  41. package/dist/pages/head-client.d.mts +1 -1
  42. package/dist/pages/head.d.mts +1 -1
  43. package/dist/pages/index.d.mts +2 -2
  44. package/dist/pages/index.mjs +5 -5
  45. package/dist/pages/islands-plugin.d.mts +1 -1
  46. package/dist/pages/islands-plugin.mjs +3 -3
  47. package/dist/pages/protocol.d.mts +2 -2
  48. package/dist/pages/protocol.mjs +5 -2
  49. package/dist/{plugin-inference-D04iL1mW.mjs → plugin-inference-CJxi_fWI.mjs} +3 -3
  50. package/dist/{prepare-DUo9q8cM.mjs → prepare-C_cVurhP.mjs} +15 -18
  51. package/dist/{preset-D0My64KQ.mjs → preset-CVvwCeIy.mjs} +4 -4
  52. package/dist/{project-cmd-Dd1gNRdd.mjs → project-cmd-DnU7u9QF.mjs} +13 -14
  53. package/dist/{project-paths-CCMrHYQm.mjs → project-paths-tpdR1mJR.mjs} +2 -2
  54. package/dist/{project-tsconfig-DMBV55K2.mjs → project-tsconfig-D9uSVVpA.mjs} +2 -2
  55. package/dist/{protocol-6UZCowS1.d.mts → protocol-6hTJ04T1.d.mts} +3 -3
  56. package/dist/{resolve-project-D4O1_fZz.mjs → resolve-project-D2HI3TrG.mjs} +2 -2
  57. package/dist/{rollback-DzmCCrFg.mjs → rollback-Yh7bCKob.mjs} +21 -23
  58. package/dist/{route-types-BpSJEW20.mjs → route-types-CfKfhbIg.mjs} +234 -3
  59. package/dist/{runner-BQyKUqAL.mjs → runner-h272wcPj.mjs} +4 -5
  60. package/dist/{runner-pg-EuhrFW3D.mjs → runner-pg-waxJOnBb.mjs} +1 -1
  61. package/dist/runtime/ai.mjs +2 -2
  62. package/dist/runtime/auth.d.mts +1 -1
  63. package/dist/runtime/better-auth-pg.d.mts +1 -1
  64. package/dist/runtime/better-auth-pg.mjs +3 -3
  65. package/dist/runtime/better-auth.d.mts +1 -1
  66. package/dist/runtime/better-auth.mjs +2 -2
  67. package/dist/runtime/client-react.d.mts +2 -2
  68. package/dist/runtime/client-react.mjs +1 -1
  69. package/dist/runtime/client-solid.d.mts +2 -2
  70. package/dist/runtime/client-solid.mjs +1 -1
  71. package/dist/runtime/client-svelte.d.mts +2 -2
  72. package/dist/runtime/client-svelte.mjs +1 -1
  73. package/dist/runtime/client-vue.d.mts +2 -2
  74. package/dist/runtime/client-vue.mjs +1 -1
  75. package/dist/runtime/client.d.mts +2 -2
  76. package/dist/runtime/client.mjs +1 -1
  77. package/dist/runtime/db-pg.d.mts +1 -1
  78. package/dist/runtime/env-helpers.d.mts +1 -1
  79. package/dist/runtime/env-public-client.d.mts +1 -1
  80. package/dist/runtime/env-public-client.mjs +2 -0
  81. package/dist/runtime/env-public.d.mts +3 -4
  82. package/dist/runtime/env-public.mjs +3 -1
  83. package/dist/runtime/env.mjs +1 -1
  84. package/dist/runtime/fetch-stream.d.mts +1 -1
  85. package/dist/runtime/fetch-stream.mjs +1 -1
  86. package/dist/runtime/fetch.d.mts +1 -1
  87. package/dist/runtime/fetch.mjs +1 -1
  88. package/dist/runtime/handler.d.mts +2 -2
  89. package/dist/runtime/handler.mjs +1 -1
  90. package/dist/runtime/isr.mjs +1 -1
  91. package/dist/runtime/live-server.mjs +2 -0
  92. package/dist/runtime/live.d.mts +2 -2
  93. package/dist/runtime/live.mjs +3 -1
  94. package/dist/runtime/migration-handler-pg.mjs +1 -1
  95. package/dist/runtime/migration-handler.mjs +1 -1
  96. package/dist/runtime/remote/index.mjs +11 -1
  97. package/dist/runtime/sandbox.d.mts +1 -4
  98. package/dist/runtime/sandbox.mjs +1 -1
  99. package/dist/runtime/validator.d.mts +1 -1
  100. package/dist/runtime/ws-server.d.mts +2 -2
  101. package/dist/runtime/ws-server.mjs +2 -0
  102. package/dist/runtime/ws.d.mts +3 -3
  103. package/dist/runtime/ws.mjs +2 -0
  104. package/dist/{scan-VCAM1oh3.mjs → scan-Dp_Gyzs3.mjs} +3 -3
  105. package/dist/{scan---8wfN58.mjs → scan-i7Yz54fv.mjs} +26 -8
  106. package/dist/{secret-CMLYWkE-.mjs → secret-u7FRvg8d.mjs} +22 -24
  107. package/dist/{skills-Dl3u05da.mjs → skills-DsdNDtX3.mjs} +6 -7
  108. package/dist/{subcommand-prompt-B8ng0FTS.mjs → subcommand-prompt-DtES-oP6.mjs} +34 -35
  109. package/dist/sveltekit.mjs +1 -1
  110. package/dist/validate-DT7nFMlf.mjs +504 -0
  111. package/dist/{yarn-pnp-WLW2IHUY.mjs → yarn-pnp-CW8LB6g_.mjs} +1 -1
  112. package/package.json +19 -19
  113. package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +94 -0
  114. package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +32 -11
  115. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +45 -0
  116. package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +5 -5
  117. package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +1 -1
  118. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +1 -1
  119. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +4 -1
  120. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +29 -12
  121. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +1 -1
  122. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +1 -0
  123. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +18 -6
  124. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +1 -1
  125. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +35 -0
  126. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +70 -0
  127. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +3 -1
  128. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +11 -7
  129. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +3 -1
  130. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +1 -1
  131. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +141 -26
  132. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +1 -1
  133. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +1 -1
  134. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
  135. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +16 -28
  136. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +16 -0
  137. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +15 -17
  138. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
  139. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +255 -2
  140. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +175 -0
  141. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +70 -5
  142. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
  143. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
  144. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +9 -3
  145. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +63 -11
  146. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
  147. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +27 -3
  148. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
  149. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +8 -0
  150. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +36 -4
  151. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
  152. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
  153. package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +403 -390
  154. package/skills/void/docs/node_modules/void/node_modules/pg/README.md +2 -1
  155. package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +1 -1
  156. package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +1 -0
  157. package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +18 -6
  158. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +1 -1
  159. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +35 -0
  160. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +70 -0
  161. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +3 -1
  162. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +11 -7
  163. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +3 -1
  164. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +1 -1
  165. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +141 -26
  166. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +1 -1
  167. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +1 -1
  168. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
  169. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +16 -28
  170. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +16 -0
  171. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +15 -17
  172. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
  173. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +255 -2
  174. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +175 -0
  175. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +70 -5
  176. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
  177. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
  178. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +9 -3
  179. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +63 -11
  180. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
  181. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +27 -3
  182. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
  183. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +8 -0
  184. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +36 -4
  185. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
  186. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
  187. package/skills/void/docs/reference/cli.md +5 -1
  188. package/dist/agents-MhSzNMiC.mjs +0 -151
  189. package/dist/collect-9rO3JFNM.mjs +0 -55
  190. package/dist/config-hhMYPVRT.mjs +0 -21
  191. package/dist/dist-abzUneor.mjs +0 -1287
  192. package/dist/drizzle-DqstQTGq.mjs +0 -232
  193. package/dist/link-ZFmboqY3.mjs +0 -47
  194. package/dist/output-DeiS4oEX.mjs +0 -139
  195. package/dist/plan-aD3wRDqF.mjs +0 -271
  196. package/dist/project-CH9pdo16.mjs +0 -72
  197. package/dist/project-slug-rX3kTOfY.mjs +0 -10
  198. package/dist/validate-CNWm-PsL.mjs +0 -186
  199. /package/dist/{auth-migrations-BP-hMzYl.mjs → auth-migrations-BTZ-ATvQ.mjs} +0 -0
  200. /package/dist/{auth-Dz2CCn4T.d.mts → auth-qgMlYp7Z.d.mts} +0 -0
  201. /package/dist/{canonical-json-CEyQaVDa.mjs → canonical-json-DuDiiUsQ.mjs} +0 -0
  202. /package/dist/{cf-access-DKDsgwOU.mjs → cf-access-Bqw81xAf.mjs} +0 -0
  203. /package/dist/{defer-C-bdSM_b.mjs → defer-YsYDUoii.mjs} +0 -0
  204. /package/dist/{dotenv-lS94ymhM.mjs → dotenv-D_UbC_vc.mjs} +0 -0
  205. /package/dist/{env-raw-Dtj1UAoK.mjs → env-raw-CoS20LHP.mjs} +0 -0
  206. /package/dist/{fetch-error-B6RaJ-eZ.d.mts → fetch-error-Sp1R4mZv.d.mts} +0 -0
  207. /package/dist/{git-metadata-Ce0AtSZL.mjs → git-metadata-CBKaL0v5.mjs} +0 -0
  208. /package/dist/{head-eOUCWUNy.d.mts → head-nmvOgFjd.d.mts} +0 -0
  209. /package/dist/{log-BdD_Fpms.mjs → log-ChfPKsVd.mjs} +0 -0
  210. /package/dist/{pathe.M-eThtNZ-BrPhGF_K.mjs → pathe.M-eThtNZ-CQzLbt4c.mjs} +0 -0
  211. /package/dist/{pg-CempqvEJ.mjs → pg-J2HbZIkX.mjs} +0 -0
  212. /package/dist/{providers-BJIoduK9.d.mts → providers-BNKRacMr.d.mts} +0 -0
  213. /package/dist/{providers-BwPbdHdi.mjs → providers-CJlNS3kT.mjs} +0 -0
  214. /package/dist/{proxy-M3pxItg2.mjs → proxy-D-3_D-Gl.mjs} +0 -0
  215. /package/dist/{chunk-DJd-R1mw.mjs → rolldown-runtime-DJK8HYOj.mjs} +0 -0
  216. /package/dist/{standard-schema-Cy0lfeWv.d.mts → standard-schema-DJ0HW7QP.d.mts} +0 -0
  217. /package/dist/{types-BodZGegX.d.mts → types-lLjNE9Qp.d.mts} +0 -0
@@ -0,0 +1,347 @@
1
+ # Migration Rules
2
+
3
+ This reference describes exactly what `vp migrate` does to a project: how it
4
+ updates dependencies, rewrites source imports and package scripts, and adjusts
5
+ package-manager configuration. See the [migration guide](./migrate.md) for the
6
+ command overview and workflow.
7
+
8
+ Except for [Before You Migrate](#before-you-migrate), which lists steps you
9
+ take yourself, everything below describes automatic behavior.
10
+
11
+ ## Before You Migrate
12
+
13
+ 1. Run `vp upgrade` so the global CLI has the latest migration rules. A stale
14
+ local `vite-plus` is not a blocker: when the project's local copy is older,
15
+ migration delegates to the global CLI.
16
+ 2. Upgrade the project to Vite 8+ and Vitest 4.1+ when necessary.
17
+ 3. Run `vp migrate` from the workspace root. Use `--no-interactive` in
18
+ automated environments.
19
+ 4. Review every changed manifest, package-manager config, source rewrite, and
20
+ generated lockfile.
21
+ 5. Validate with `vp install`, `vp check`, `vp test`, and `vp build`.
22
+
23
+ Migration is idempotent: running it again after a successful migration should
24
+ not produce another diff.
25
+
26
+ ## Upgrade vs. Full Setup
27
+
28
+ On a project that already depends on `vite-plus`, `vp migrate` performs an
29
+ upgrade only: it updates dependencies and package-manager configuration and
30
+ finalizes imports. It does not touch project setup.
31
+
32
+ - `--full` also runs the setup actions: git hooks, editor config, agent files,
33
+ ESLint and Prettier migration, framework shims, the tsconfig `baseUrl` fix,
34
+ and the `.nvmrc`/Volta to `.node-version` conversion.
35
+ - `--hooks`, `--agent`, and `--editor` opt into a single setup action without
36
+ `--full`.
37
+
38
+ When a default upgrade skips setup actions that would apply, it prints a hint
39
+ to run `vp migrate --full`. Fresh (non Vite+) projects always run the full
40
+ migration.
41
+
42
+ ## Dependency Rules
43
+
44
+ What happens to each toolchain dependency, at a glance:
45
+
46
+ | Dependency | What happens |
47
+ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
48
+ | `vite-plus` | Added where the package is migrated; plain ranges re-pinned to the concrete target, directly or through a catalog. |
49
+ | `vite` | Existing declarations kept and pointed at the core alias. Under pnpm, added as a direct dev dependency wherever needed (see [Vite and Overrides](#vite-and-overrides)). |
50
+ | `vitest` | Removed in the common node-mode case because `vite-plus` provides it transitively. Kept or added only when [directly required](#when-vitest-is-directly-required). |
51
+ | `@vitest/*` | Directly installed lockstep packages aligned to the bundled Vitest version (see [Vitest Ecosystem Packages](#vitest-ecosystem-packages)). |
52
+ | `@voidzero-dev/vite-plus-test` | Removed everywhere: dependencies, overrides, resolutions, and catalog aliases. Imports are rewritten to the current `vite-plus/test*` surface. |
53
+
54
+ ### Version Selection
55
+
56
+ - `vite-plus` is pinned to the concrete version of the CLI running the
57
+ migration, never the `latest` dist-tag.
58
+ - The `vite` alias targets `@voidzero-dev/vite-plus-core` from the same Vite+
59
+ release.
60
+ - A catalog-backed manifest may contain `catalog:` or a named catalog
61
+ reference. Migration keeps the reference and updates the referenced catalog
62
+ value to the concrete toolchain target.
63
+ - Deliberate protocol pins are preserved: `workspace:`, `file:`, `link:`,
64
+ `npm:`, `github:`, Git URLs, and HTTP URLs.
65
+ - Migration reconciles every workspace package, not only the root manifest.
66
+ Shared overrides and catalogs stay at the workspace root; dependencies that
67
+ provide a peer belong in each package that needs them.
68
+
69
+ ### Vite and Overrides
70
+
71
+ Package-manager overrides do not create dependency edges by themselves. Under
72
+ pnpm, a package that lists `vite-plus` in `dependencies` or `devDependencies`
73
+ but has no `vite` entry anywhere (`dependencies`, `devDependencies`,
74
+ `optionalDependencies`, or `peerDependencies`) lets pnpm auto-install upstream
75
+ Vite to satisfy Vitest's required `vite` peer, splitting the project across
76
+ separate Vite+, Vite, and Vitest instances. To prevent this, `vp migrate` adds
77
+ the missing `vite` entry to `devDependencies` of every such package; the
78
+ workspace override then redirects it to Vite+ core.
79
+
80
+ Related rules:
81
+
82
+ - A direct `vite` declaration is never removed merely because a root override
83
+ exists.
84
+ - Plain or stale aliases are normalized; named catalog references are kept.
85
+ - The direct-entry rule above is pnpm-specific. Bun mirrors its core alias as
86
+ a direct dependency for its peer resolver, and npm browser-provider layouts
87
+ may need a top-level `vite` edge so nested Vitest packages can resolve
88
+ `vite`.
89
+
90
+ ### When Vitest Is Directly Required
91
+
92
+ Migration keeps or adds a package-local `vitest` at the exact bundled version
93
+ when any of the following is true:
94
+
95
+ - an installed dependency has a non-optional `vitest` peer, whether exact or a
96
+ range;
97
+ - the package uses Vitest browser mode or an opt-in browser provider;
98
+ - source or TypeScript configuration retains an upstream `vitest` reference;
99
+ - the package declares `@nuxt/test-utils`; or
100
+ - dependency metadata is unavailable and an existing direct `vitest` might be
101
+ satisfying an unknown required peer.
102
+
103
+ Detection reads installed peer metadata, so integrations such as
104
+ `vite-plugin-gherkin` are handled even though their names do not contain
105
+ `vitest`.
106
+
107
+ When a package qualifies, migration:
108
+
109
+ - adds `vitest` to that package, not indiscriminately to every workspace
110
+ package;
111
+ - uses the existing catalog reference when supported, otherwise the exact
112
+ bundled version; and
113
+ - keeps a matching workspace override or resolution so the graph resolves a
114
+ single Vitest version.
115
+
116
+ A peer declaration alone does not install Vitest. If a surviving
117
+ `peerDependencies.vitest` uses a catalog entry that migration will remove, it
118
+ is resolved to the public peer range first.
119
+
120
+ ### Vitest Ecosystem Packages
121
+
122
+ Official current `@vitest/*` packages generally publish in lockstep with
123
+ Vitest. Migration aligns the ones the project directly installs, including
124
+ `@vitest/coverage-v8`, `@vitest/coverage-istanbul`, `@vitest/ui`, and
125
+ `@vitest/web-worker`:
126
+
127
+ - when the package manager supports catalogs, they are referenced through the
128
+ toolchain catalog: an existing `catalog:` / `catalog:<name>` reference is
129
+ preserved, a catalog entry is added for any package that lacks one, and each
130
+ entry is updated to the bundled Vitest version;
131
+ - when catalogs are unsupported (npm, a standalone bun project, or a
132
+ pre-catalog pnpm/Yarn), the concrete bundled version is written instead.
133
+
134
+ Packages that are **not** aligned:
135
+
136
+ - `@vitest/eslint-plugin` follows its own version line;
137
+ - `@vitest/coverage-c8` stopped at an older release and has no Vitest 4
138
+ version; and
139
+ - third-party `vitest-*` integrations keep their own compatible versions,
140
+ though their required Vitest peer may still trigger
141
+ [direct provisioning](#when-vitest-is-directly-required).
142
+
143
+ For browser mode, the base `@vitest/browser` runtime and
144
+ `@vitest/browser-preview` are bundled by Vite+ and are removed as direct
145
+ dependencies. The Playwright and WebdriverIO providers stay opt-in: a kept or
146
+ injected provider is referenced through the preferred toolchain catalog at the
147
+ bundled Vitest version (or written concretely when catalogs are unsupported),
148
+ and its `playwright` or `webdriverio` peer is installed alongside.
149
+
150
+ Providers are detected before imports are rewritten. This covers legacy
151
+ projects that aliased `vitest` to `@voidzero-dev/vite-plus-test` and import
152
+ from `vitest/browser-<provider>`, `vitest/browser/providers/<provider>`, or
153
+ `vitest/plugins/browser-<provider>`: those imports still install the
154
+ corresponding `@vitest/browser-playwright` or `@vitest/browser-webdriverio`
155
+ dependency and its framework peer.
156
+
157
+ Object-valued nested npm and Bun overrides are preserved: they are
158
+ user-defined scopes rather than scalar version pins.
159
+
160
+ ## Source Rewrite Rules
161
+
162
+ ### `vite` Imports
163
+
164
+ `vite` and `vite/*` imports are rewritten to `vite-plus` **only in config
165
+ entry files**: `vite.config.*`, `vitest.config.*`, and any config file the
166
+ migration resolved. Every other file keeps its `vite` imports, for two
167
+ reasons:
168
+
169
+ - `vite-plus` is not a guaranteed superset of Vite's exposed surface. It owns
170
+ only `defineConfig`, `defineProject`, and `lazyPlugins`, so rewriting a
171
+ pass-through symbol such as `createBuilder` or `loadConfigFromFile`
172
+ (including in `typeof import('vite')` type positions) can break.
173
+ - An unrewritten `vite` import still resolves through the
174
+ `@voidzero-dev/vite-plus-core` alias in a Vite+ project.
175
+
176
+ Plugin packages (an unscoped name starting with `vite-plugin-` or
177
+ `unplugin-`, or `vite` in `peerDependencies`/`dependencies`) skip the rewrite
178
+ even in config files. Only the `vite` specifier is in scope for this rule.
179
+
180
+ `declare module 'vite'` augmentations follow the same rule and are preserved
181
+ outside config files. Through the core alias they reach the same
182
+ `@voidzero-dev/vite-plus-core` module whose `UserConfig` types `defineConfig`
183
+ from `vite-plus`, so they keep working after migration; `vite-plus` itself
184
+ exports no `UserConfig` symbol, so a rewritten `declare module 'vite-plus'`
185
+ augmentation would merge with nothing. Extensions aimed at `vite-plus`'s own
186
+ surface are written against `vite-plus` by hand.
187
+
188
+ ### `vitest` and Browser Imports
189
+
190
+ - Ordinary `vitest` and `vitest/*` imports are rewritten to
191
+ `vite-plus/test*`.
192
+ - Legacy Playwright and WebdriverIO provider imports are detected before this
193
+ rewrite so their optional provider dependencies are not lost.
194
+ - Scoped `@vitest/browser*` imports are rewritten to the corresponding
195
+ `vite-plus/test/browser*` exports, provisioning opt-in providers when
196
+ needed.
197
+ - Existing `vite-plus/test*` imports are left unchanged.
198
+
199
+ ### What Is Never Rewritten
200
+
201
+ - `declare module 'vitest'` and `declare module '@vitest/browser*'`: module
202
+ augmentation must retain the upstream module identity.
203
+ - References that stay behind, such as `compilerOptions.types`,
204
+ `require.resolve`, `import.meta.resolve`, and `vitest/package.json`,
205
+ require package-local Vitest (see
206
+ [When Vitest Is Directly Required](#when-vitest-is-directly-required)).
207
+ - In a package that declares `@nuxt/test-utils`, every `vitest` and
208
+ `vitest/*` module specifier is preserved package-wide: the Nuxt transform
209
+ requires the upstream identity and can otherwise inject a duplicate `vi`
210
+ import. This exception does not apply to sibling packages or to scoped
211
+ `@vitest/browser*` imports.
212
+
213
+ The `prefer-vite-plus-imports` lint rule follows the same Nuxt exception, so
214
+ lint autofix preserves these imports too.
215
+
216
+ ## Package Script Rewrite Rules
217
+
218
+ Migration rewrites commands provided by the Vite+ toolchain in `package.json`
219
+ scripts while preserving their arguments:
220
+
221
+ | Before | After |
222
+ | ------------- | ------------------------------------------- |
223
+ | `vite` | `vp dev`, or the matching `vp` subcommand |
224
+ | `vitest` | `vp test` |
225
+ | `oxlint` | `vp lint` |
226
+ | `oxfmt` | `vp fmt` |
227
+ | `tsdown` | `vp pack` |
228
+ | `lint-staged` | `vp staged` |
229
+ | `eslint` | `vp lint`, when its optional migration runs |
230
+ | `prettier` | `vp fmt`, when its optional migration runs |
231
+
232
+ For commands launched through `bunx`, migration preserves `bunx` and its
233
+ `--bun` flag (keeping the user's chosen runtime) and rewrites only the managed
234
+ command. This also works when `bunx` follows a command-launcher delimiter such
235
+ as `run` or `--`:
236
+
237
+ | Before | After |
238
+ | ------------------------------------------------------- | -------------------------------------------------------- |
239
+ | `bunx --bun vite build` | `bunx --bun vp build` |
240
+ | `bunx --bun vitest run` | `bunx --bun vp test run` |
241
+ | `portless --tailscale run bunx --bun vite` | `portless --tailscale run bunx --bun vp dev` |
242
+ | `dotenv -e .env.test -- bunx --bun oxlint --type-aware` | `dotenv -e .env.test -- bunx --bun vp lint --type-aware` |
243
+
244
+ Unrelated `bunx` commands and other package-executor forms remain unchanged.
245
+
246
+ ## Node.js Version Rules
247
+
248
+ Migration converts legacy Node.js version-manager files to `.node-version`,
249
+ the format Vite+ reads. On an existing Vite+ project this conversion is part
250
+ of the full setup bucket, so it runs with `vp migrate --full`; fresh
251
+ migrations run it unconditionally.
252
+
253
+ - `.nvmrc` and Volta `volta.node` pins are converted to `.node-version`. An
254
+ existing `.node-version` is kept.
255
+ - When `.nvmrc` is removed, any `actions/setup-node` `node-version-file:
256
+ .nvmrc` reference in `.github/workflows/*.{yml,yaml}` and composite actions
257
+ (`.github/actions/**/action.{yml,yaml}`) is repointed to `.node-version` so
258
+ CI does not fail with "node version file ... does not exist".
259
+
260
+ ## Package-Manager Rules
261
+
262
+ ### pnpm
263
+
264
+ **Root settings location.** pnpm 10.6.2+ uses `pnpm-workspace.yaml` as the
265
+ single source for supported root settings. Migration moves recognized
266
+ `package.json#pnpm` fields there, including overrides, peer rules, patch
267
+ settings, package extensions, architecture and build policy, audit/update
268
+ configuration, and configuration dependencies. It removes the `pnpm` object
269
+ when it becomes empty and preserves unknown keys that may belong to other
270
+ tooling.
271
+
272
+ - When both files define the same migrated setting, object entries are merged
273
+ recursively and unique array entries are retained. Values from
274
+ `package.json#pnpm` win at conflicting scalar leaves, while workspace-only
275
+ sibling entries are preserved.
276
+ - Before pnpm 10.6.2, these settings stay in `package.json#pnpm`. (Workspace
277
+ settings support arrived incrementally: 10.5.0 in general, 10.5.1 for
278
+ overrides, 10.6.2 for `peerDependencyRules`. pnpm 11 no longer reads the
279
+ legacy `package.json` settings.)
280
+
281
+ **Catalogs.** Catalogs are a separate feature, supported from pnpm 9.5.0,
282
+ independent of the settings boundary above. Even below 10.6.2, where
283
+ overrides stay in `package.json#pnpm`, migration still rewrites the workspace
284
+ catalog off stale wrapper aliases and keeps `catalog:` overrides as
285
+ references rather than inlining them to concrete versions.
286
+
287
+ - Dependency references, default and named catalogs, overrides, and
288
+ `peerDependencyRules` are kept consistent with each other.
289
+ - pnpm accepts the logical default catalog as either top-level `catalog` or
290
+ `catalogs.default`, but not both. Migration preserves the existing form and
291
+ never creates the other form beside it.
292
+ - When an existing named catalog already owns `vite-plus`, `vite`, or
293
+ `vitest`, migration reuses that managed toolchain catalog for newly added
294
+ dependencies and overrides. It creates a top-level default catalog only
295
+ when no managed or default catalog can be reused.
296
+
297
+ **Other rules.**
298
+
299
+ - Each package that declares `vite-plus` also gets a direct `vite` dev
300
+ dependency (see [Vite and Overrides](#vite-and-overrides)).
301
+ - Unrelated selector-shaped and object-valued overrides are preserved.
302
+
303
+ ### npm
304
+
305
+ - Direct aliases are normalized before the matching override is added, so npm
306
+ does not fail with `EOVERRIDE`.
307
+ - When a real Vite installation changes to the core alias, stale Vite install
308
+ and lockfile state is removed before reinstalling.
309
+ - Opt-in browser-provider layouts get a top-level `vite` edge when nested
310
+ Vitest packages otherwise cannot resolve it.
311
+
312
+ ### Yarn
313
+
314
+ - Vite+ does not support Plug'n'Play. Migration detects explicit and implicit
315
+ PnP and converts the project to `nodeLinker: node-modules`, preserving all
316
+ unrelated `.yarnrc.yml` settings. `--no-interactive` accepts the
317
+ conversion; a process-level `YARN_NODE_LINKER=pnp` must be fixed by the
318
+ caller.
319
+ - Catalog references and user hoisting settings are preserved.
320
+ - Migration avoids split Vitest copies under workspace hoisting isolation: it
321
+ applies a package-level fix where possible and warns when the isolation
322
+ cannot be changed safely.
323
+
324
+ ### Bun
325
+
326
+ - Bun catalogs only resolve inside a workspace (a root `package.json` with a
327
+ non-empty `workspaces`). In a bun workspace, existing top-level or
328
+ workspace catalog locations and named catalog references are preserved. A
329
+ standalone (single-package) bun project keeps concrete specs and gets no
330
+ catalog field, because `bun install` cannot resolve `catalog:` outside a
331
+ workspace.
332
+ - The core alias is mirrored as a direct `vite` dependency so Bun sees the
333
+ peer provider before applying overrides.
334
+
335
+ ## After the Migration
336
+
337
+ - Each Vite config is inspected for Rolldown-incompatible patterns (such as
338
+ `manualChunks`). Anything found is reported as a warning; the config is not
339
+ changed.
340
+ - Dependencies are reinstalled once to refresh the lockfile. If installation
341
+ fails, migration reports the error and exits with a nonzero status.
342
+ - After a successful migration, `vp fmt` runs on the files changed during
343
+ migration, excluding paths that were already dirty in the Git worktree.
344
+ Oxfmt selects the supported formats; non-Git projects retain full-project
345
+ formatting. Formatting is skipped while the project still uses Prettier. A
346
+ formatter failure is reported as a warning so the migration result and the
347
+ manual formatting command remain available.
@@ -48,6 +48,10 @@ The `migrate` command is designed to move existing projects onto Vite+ quickly.
48
48
  - Updates scripts to the Vite+ command surface
49
49
  - Can set up commit hooks
50
50
  - Can write agent and editor configuration files
51
+ - Formats the migrated project
52
+
53
+ See [Migration Rules](./migrate-rules.md) for the exact dependency, source
54
+ rewrite, and package-manager behavior.
51
55
 
52
56
  Most projects will require further manual adjustments after running `vp migrate`.
53
57
 
@@ -75,8 +79,8 @@ Migrate this project to Vite+. Vite+ replaces the current split tooling around r
75
79
  After the migration:
76
80
 
77
81
  - Confirm `vite` imports were rewritten to `vite-plus` where needed
78
- - Confirm `vitest` imports were rewritten to `vite-plus/test` where needed
79
- - Remove old `vite` and `vitest` dependencies only after those rewrites are confirmed
82
+ - Confirm `vitest` imports were rewritten to `vite-plus/test` (and `@vitest/browser*` to `vite-plus/test/browser*`) where needed
83
+ - Remove old `vite`, `vitest`, and `@vitest/browser*` dependencies only after those rewrites are confirmed — `vite-plus` ships them as direct deps
80
84
  - Move remaining tool-specific config into the appropriate blocks in `vite.config.ts`
81
85
 
82
86
  Command mapping to keep in mind:
@@ -96,20 +100,30 @@ Summarize the migration at the end and report any manual follow-up still require
96
100
 
97
101
  ### Vitest
98
102
 
99
- Vitest is automatically migrated through `vp migrate`. If you are migrating manually, you have to update all the imports to `vite-plus/test` instead:
103
+ Vitest is automatically migrated through `vp migrate`. `vite-plus` re-exports upstream `vitest@4.x` under `vite-plus/test*`, so for node-mode tests a single `vite-plus` install is enough — you no longer need to install `vitest` directly.
104
+
105
+ Browser mode is more nuanced. `vite-plus` bundles the base browser runtime (`@vitest/browser`) and the preview provider (`@vitest/browser-preview`), but the **Playwright** and **WebdriverIO** providers stay opt-in: `@vitest/browser-playwright` (with its `playwright` peer) and `@vitest/browser-webdriverio` (with its `webdriverio` peer) are **not** shipped with `vite-plus`, so non-browser projects never pull them in. `vp migrate` detects the provider you actually use and adds it — pinned to the bundled vitest version — together with its framework. If you migrate manually and use one of these providers, install the provider package and its framework yourself so `vite-plus/test/browser-playwright` / `vite-plus/test/browser-webdriverio` can resolve.
106
+
107
+ If you are migrating manually, update all the imports to `vite-plus/test*` instead:
100
108
 
101
109
  ```ts
102
110
  // before
111
+ import { defineConfig } from 'vitest/config';
103
112
  import { describe, expect, it, vi } from 'vitest';
113
+ import { playwright } from '@vitest/browser-playwright';
104
114
 
105
115
  const { page } = await import('@vitest/browser/context');
106
116
 
107
117
  // after
118
+ import { defineConfig } from 'vite-plus';
108
119
  import { describe, expect, it, vi } from 'vite-plus/test';
120
+ import { playwright } from 'vite-plus/test/browser-playwright';
109
121
 
110
122
  const { page } = await import('vite-plus/test/browser/context');
111
123
  ```
112
124
 
125
+ `declare module 'vitest'` / `declare module '@vitest/browser*'` augmentations are intentionally **not** rewritten — `vite-plus/test*` is a thin re-export of upstream `vitest*`, so type augmentations have to target the upstream module identity to merge correctly. Leave those `declare module` statements pointing at `'vitest'` / `'@vitest/browser*'`.
126
+
113
127
  ### tsdown
114
128
 
115
129
  If your project uses a `tsdown.config.ts`, move its options into the `pack` block in `vite.config.ts`:
@@ -156,6 +170,16 @@ export default defineConfig({
156
170
 
157
171
  After migrating, remove lint-staged from your dependencies and delete any lint-staged config files. See the [Commit hooks guide](/guide/commit-hooks) and [Staged config reference](/config/staged) for details.
158
172
 
173
+ ### Git hook tools
174
+
175
+ The `vp migrate` command can set up Vite+ commit hooks for you, but it doesn't automatically migrate every type of Git hook tool. This automatic migration path is specifically designed to handle Husky v9+ and lint-staged-style setups. Projects using Husky versions older than 9.0.0 are skipped and should upgrade to Husky v9 before using the automatic migration path.
176
+
177
+ If your project currently uses `lefthook`, `simple-git-hooks`, or `yorkie`, `vp migrate` will leave your existing configuration alone and show a warning. This happens even if you choose to set up hooks during the prompt or include the `--hooks` flag.
178
+
179
+ If you want to move one of those tools over to Vite+ manually, you can follow these steps. First, move your staged-file commands into the `staged` block within `vite.config.ts`. Then, update your lifecycle script so it runs `vp config`. You will also need to create a Vite+ hook at `.vite-hooks/pre-commit` that runs `vp staged`. Finally, once you have confirmed that the Vite+ hook is working as expected, you can remove the old tool's configuration and dependency.
180
+
181
+ You can find more details about the full Vite+ hook setup in the [Commit hooks guide](/guide/commit-hooks).
182
+
159
183
  ## Examples
160
184
 
161
185
  ```bash
@@ -0,0 +1,176 @@
1
+ # Monorepo
2
+
3
+ Vite+ supports monorepos with `vite.config.ts` at the root. You can define the defaults for `lint`, `fmt`, etc. at the root, and use `overrides` to apply package-specific lint and format settings.
4
+
5
+ Because `vite.config.ts` is just JavaScript, you can choose to put your entire config into this file or compose it using regular JavaScript imports. You can still have separate `vite.config.ts` files in each package for the Vite, Vitest, framework or runtime configuration.
6
+
7
+ ## Root Config With Overrides
8
+
9
+ Use `lint.overrides` for Oxlint rules that only apply to some packages:
10
+
11
+ ```ts [vite.config.ts]
12
+ import { defineConfig } from 'vite-plus';
13
+
14
+ export default defineConfig({
15
+ lint: {
16
+ plugins: ['typescript'],
17
+ options: {
18
+ typeAware: true,
19
+ typeCheck: true,
20
+ },
21
+ rules: {
22
+ 'no-console': ['error', { allow: ['warn', 'error'] }],
23
+ },
24
+ overrides: [
25
+ {
26
+ files: ['apps/web/**', 'packages/ui/**'],
27
+ plugins: ['typescript', 'react'],
28
+ rules: {
29
+ 'react/self-closing-comp': 'error',
30
+ },
31
+ },
32
+ {
33
+ files: ['apps/api/**'],
34
+ env: {
35
+ node: true,
36
+ },
37
+ rules: {
38
+ 'no-console': 'off',
39
+ },
40
+ },
41
+ {
42
+ files: ['**/*.test.ts', '**/*.spec.ts'],
43
+ plugins: ['typescript', 'vitest'],
44
+ rules: {
45
+ '@typescript-eslint/no-explicit-any': 'off',
46
+ 'vitest/no-disabled-tests': 'error',
47
+ },
48
+ },
49
+ ],
50
+ },
51
+ });
52
+ ```
53
+
54
+ Globs are resolved from the root `vite.config.ts`, so use workspace paths such as `apps/web/**`, `apps/api/**`, and `packages/ui/**`.
55
+
56
+ ::: tip
57
+ When a `lint.overrides` entry sets `plugins`, that list replaces the base `lint.plugins` list for matched files. Include every plugin needed by that file group, such as `['typescript', 'react']`. Omit `plugins` only when the override should inherit the base list unchanged.
58
+ :::
59
+
60
+ ## Format Overrides
61
+
62
+ Use `fmt.overrides` for file or package-specific Oxfmt options. Formatter overrides put their settings under `options`:
63
+
64
+ ```ts [vite.config.ts]
65
+ import { defineConfig } from 'vite-plus';
66
+
67
+ export default defineConfig({
68
+ fmt: {
69
+ singleQuote: true,
70
+ semi: true,
71
+ overrides: [
72
+ {
73
+ files: ['apps/api/**'],
74
+ options: {
75
+ printWidth: 120,
76
+ },
77
+ },
78
+ {
79
+ files: ['**/*.md'],
80
+ options: {
81
+ proseWrap: 'always',
82
+ },
83
+ },
84
+ ],
85
+ },
86
+ });
87
+ ```
88
+
89
+ ## Composing Configuration Files
90
+
91
+ You can split configuration across your repository and compose them using JavaScript imports. Export JavaScript objects from nearby files or packages, import them in the root config, and merge them into the matching override.
92
+
93
+ ```ts [tooling/lint/react.ts]
94
+ import type { OxlintOverride } from 'vite-plus/lint';
95
+
96
+ export const reactLint = {
97
+ plugins: ['typescript', 'react'],
98
+ rules: {
99
+ 'react/self-closing-comp': 'error',
100
+ },
101
+ } satisfies Omit<OxlintOverride, 'files'>;
102
+ ```
103
+
104
+ ```ts [tooling/lint/node.ts]
105
+ import type { OxlintOverride } from 'vite-plus/lint';
106
+
107
+ export const nodeLint = {
108
+ env: {
109
+ node: true,
110
+ },
111
+ rules: {
112
+ 'no-console': 'off',
113
+ },
114
+ } satisfies Omit<OxlintOverride, 'files'>;
115
+ ```
116
+
117
+ ```ts [vite.config.ts]
118
+ import { defineConfig } from 'vite-plus';
119
+
120
+ import { nodeLint } from './tooling/lint/node';
121
+ import { reactLint } from './tooling/lint/react';
122
+
123
+ export default defineConfig({
124
+ lint: {
125
+ plugins: ['typescript'],
126
+ options: {
127
+ typeAware: true,
128
+ typeCheck: true,
129
+ },
130
+ overrides: [
131
+ {
132
+ files: ['apps/web/**', 'packages/ui/**'],
133
+ ...reactLint,
134
+ },
135
+ {
136
+ files: ['apps/api/**'],
137
+ ...nodeLint,
138
+ },
139
+ ],
140
+ },
141
+ });
142
+ ```
143
+
144
+ This keeps the behavior centralized while letting each team or package own the pieces of config it needs.
145
+
146
+ ## App Commands
147
+
148
+ The root `vite.config.ts` is most valuable for shared linting, formatting, staged checks, and task definitions. For project-specific development, build, and test behavior, use the setup that best matches each app:
149
+
150
+ - Pass a folder to built-in Vite commands when you want to target one app:
151
+
152
+ ```bash
153
+ vp dev apps/web
154
+ vp build apps/web
155
+ ```
156
+
157
+ - Keep package-specific scripts in each package when the command differs per app:
158
+
159
+ ```json [apps/api/package.json]
160
+ {
161
+ "scripts": {
162
+ "dev": "tsx watch src/index.ts",
163
+ "build": "tsc -p tsconfig.json"
164
+ }
165
+ }
166
+ ```
167
+
168
+ - Run scripts across the workspace with `vp run`:
169
+
170
+ ```bash
171
+ vp run -r build
172
+ vp run -r --parallel dev
173
+ vp run --filter ./apps/web build
174
+ ```
175
+
176
+ See the [Run guide](/guide/run) for recursive, parallel, filtered, and cached workspace tasks.
@@ -58,4 +58,12 @@ export default defineConfig({
58
58
  });
59
59
  ```
60
60
 
61
+ Executable support is bundled into Vite+, so you do not need to install `@tsdown/exe` separately.
62
+
63
+ Building executables uses Node's [Single Executable Applications](https://nodejs.org/api/single-executable-applications.html) support and requires Node.js 25.7.0 or later. Switch the active runtime with `vp env use 26` if `vp pack --exe` reports an unsupported version.
64
+
61
65
  See the official [tsdown executable docs](https://tsdown.dev/options/exe#executable) for details about configuring custom file names, embedded assets, and cross-platform targets.
66
+
67
+ ## CSS Bundling
68
+
69
+ `vp pack` can transform and bundle CSS (including CSS Modules and [Lightning CSS](https://lightningcss.dev/) optimizations) for your entry points. This support is bundled into Vite+, so you do not need to install `@tsdown/css` or `lightningcss` separately, it works out of the box.
@@ -69,7 +69,7 @@ $ node compile-legacy-app.js ✗ cache miss: 'legacy/index.js' modified, executi
69
69
 
70
70
  ## Task Definitions
71
71
 
72
- Vite Task automatically tracks which files your command uses. You can define tasks directly in `vite.config.ts` to enable caching by default or control which files and environment variables affect cache behavior.
72
+ Vite Task [automatically tracks](/guide/automatic-data-tracking) what each task needs for caching. You can define tasks directly in `vite.config.ts` to enable caching by default or control which files and environment variables affect cache behavior.
73
73
 
74
74
  ```ts [vite.config.ts]
75
75
  import { defineConfig } from 'vite-plus';
@@ -102,10 +102,40 @@ See [Run Config](/config/run) for the full `run` block reference.
102
102
 
103
103
  ## Task Dependencies
104
104
 
105
- Use [`dependsOn`](#depends-on) to run tasks in the right order. Running `vp run deploy` with the config above runs `build` and `test` first. Dependencies can also target other packages in the same project with the `package#task` notation:
105
+ Use [`dependsOn`](/config/run#dependson) to run tasks in the right order. Running `vp run deploy` with the config above runs `build` and `test` first.
106
106
 
107
- ```ts
108
- dependsOn: ['@my/core#build', '@my/utils#lint'];
107
+ String task names in `dependsOn` reference tasks in the current or another package:
108
+
109
+ ```ts [vite.config.ts]
110
+ dependsOn: [
111
+ 'build', // same package
112
+ '@my/core#build', // another package
113
+ ];
114
+ ```
115
+
116
+ Use the object form when you need to reference all tasks with a given name from the current package's dependencies:
117
+
118
+ ```ts [vite.config.ts]
119
+ import { defineConfig } from 'vite-plus';
120
+
121
+ export default defineConfig({
122
+ run: {
123
+ tasks: {
124
+ test: {
125
+ command: 'vp test',
126
+ dependsOn: [{ task: 'build', from: 'dependencies' }],
127
+ },
128
+ },
129
+ },
130
+ });
131
+ ```
132
+
133
+ In this example, `vp run test` checks the current package's `dependencies`. For each direct workspace dependency that defines `build`, Vite Task runs that dependency's `build` task before `test`.
134
+
135
+ Use an array when you need more than one dependency field:
136
+
137
+ ```ts [vite.config.ts]
138
+ dependsOn: [{ task: 'build', from: ['dependencies', 'devDependencies'] }];
109
139
  ```
110
140
 
111
141
  ## Running in a Workspace
@@ -171,6 +201,8 @@ vp run --filter "@my/*" --filter "!@my/utils" build
171
201
 
172
202
  Multiple `--filter` flags are combined as a union. Exclusion filters are applied after all inclusions.
173
203
 
204
+ When a `--filter` matches no packages, Vite+ prints a warning and exits successfully. Pass `--fail-if-no-match` to abort the run when any filter matches nothing instead.
205
+
174
206
  ### Workspace Root (`-w`)
175
207
 
176
208
  Explicitly run the task in the workspace root package: