Skip to content

Commit 25f8d99

Browse files
committed
docs: drop by-hand preview install, use vp migrate only
1 parent db9036d commit 25f8d99

1 file changed

Lines changed: 2 additions & 62 deletions

File tree

docs/guide/upgrade.md

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -90,72 +90,12 @@ The installer resolves the ref to its `0.0.0-commit.<sha>` build through the reg
9090

9191
### Local `vite-plus` Preview
9292

93-
There are two ways to move a project's local `vite-plus` onto a preview build.
94-
95-
#### With `vp migrate` (recommended)
96-
97-
After installing the preview global CLI above, run migrate in the project:
93+
After installing the preview global CLI above, run migrate in the project to move its local `vite-plus` onto the same build:
9894

9995
```bash
10096
vp migrate
10197
```
10298

10399
Migrate points the project at the bridge registry (writing it to `.npmrc`, or `.yarnrc.yml` for Yarn Berry) and pins `vite-plus` and the `vite` -> `@voidzero-dev/vite-plus-core` alias to the matching `0.0.0-commit.<sha>` version. That registry line is what lets the same versions resolve in the project's own CI, so commit it if you want CI to test the preview too.
104100

105-
#### By hand
106-
107-
Point your package manager at the bridge registry, then pin the commit version. Use the version from the pull request comment (or from `vp --version`).
108-
109-
Configure the registry:
110-
111-
| Package manager | Registry config |
112-
| --- | --- |
113-
| npm / pnpm / Bun | `.npmrc`: `registry=https://registry-bridge.viteplus.dev/` |
114-
| Yarn (v2+) | `.yarnrc.yml`: `npmRegistryServer: "https://registry-bridge.viteplus.dev/"` |
115-
116-
Then pin `vite-plus` and any `vite` alias to the commit version, exactly like ordinary npm versions. For npm and Bun projects, update the relevant `package.json` entries:
117-
118-
```json
119-
{
120-
"devDependencies": {
121-
"vite-plus": "0.0.0-commit.<sha>",
122-
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.<sha>"
123-
},
124-
"overrides": {
125-
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.<sha>"
126-
}
127-
}
128-
```
129-
130-
Only include the direct `vite` entry if your project already has one. If your project has `@voidzero-dev/vite-plus-core` directly instead, pin that package to the same commit version. Only include the `overrides` entry if your project already pins `vite` there.
131-
132-
For pnpm workspaces, make the same override change in `pnpm-workspace.yaml` if that is where your Vite+ overrides live:
133-
134-
```yaml
135-
overrides:
136-
vite: 'npm:@voidzero-dev/vite-plus-core@0.0.0-commit.<sha>'
137-
```
138-
139-
For Yarn projects, update `resolutions` instead:
140-
141-
```json
142-
{
143-
"resolutions": {
144-
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.<sha>"
145-
}
146-
}
147-
```
148-
149-
Then install once:
150-
151-
```bash
152-
vp install
153-
```
154-
155-
After installing a preview, check the bundled versions with `vp --version`. If the preview includes a newer bundled Vitest, update your `vitest` override to that exact version so `vp test` and project imports keep using the same Vitest copy.
156-
157-
When testing is complete, restore every preview spec first: set `vite-plus` back to `latest`, set any direct `vite` / `@voidzero-dev/vite-plus-core` dependency plus any `vite` override or resolution back to `npm:@voidzero-dev/vite-plus-core@latest`, and remove the bridge `registry` line from `.npmrc` (or `.yarnrc.yml`). Then reinstall:
158-
159-
```bash
160-
vp install
161-
```
101+
After installing, check the bundled versions with `vp --version`. When testing is complete, restore the published release: set `vite-plus` back to `latest`, remove the bridge `registry` line from `.npmrc` (or `.yarnrc.yml`), and reinstall with `vp install`.

0 commit comments

Comments
 (0)