GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(cli): start vp dev/build/preview through Vite's bin script by fengmk2 · Pull Request #3056 · voidzero-dev/vite-plus Conversation
|
| Command | Before (1.2.0) | After |
|---|---|---|
vp dev |
VITE+ v1.2.0, no ready in |
VITE+ v1.2.0 ready in 83 ms |
vp dev --debug config |
banner only, no debug logs | prints vite:config debug logs |
vp dev --debug --filter index |
banner only, no debug logs | only matching lines, e.g. vite:resolve 2.28ms index.html -> … |
vp build --profile |
builds, but writes no profile | CPU profile written to …/vite-profile-0.cpuprofile |
vp preview without a build |
starts the server; every request returns 404 | The directory "dist" does not exist. Did you build your project? |
Setting DEBUG=vite:config directly did work before, so debug logs were reachable without the flag. --profile had no workaround. vp dev/build/preview --help already lists -d, --debug and -f, --filter.
These changes bring vp dev, vp build, and vp preview in line with vite. They are fixes, not breaking changes, but users can see them:
vp dev prints ready in N ms in its banner. Tests that match the banner line exactly need to allow for it.--debug/-d and --filter/-f turn on Vite's debug logs, and DEBUG also reaches child processes that Vite starts. Scripts that already passed these flags now print logs.--profile [name] writes vite-profile-N.cpuprofile (or <name>.cpuprofile) to the current directory, and vp dev --profile adds the p shortcut to start and stop the profiler.vp preview without a build exits with the missing-dist error instead of serving 404s. As in Vite, projects with a plugin that implements configurePreviewServer skip this check.vp pack already turns it on.process.argv[1] is now .../dist/vite/bin/vite.js instead of .../dist/vite/node/cli.js, so plugins that look for bin/vite.js recognize vp as the Vite CLI.vp dev starts slightly faster, because Vite's bin script turns on Node's compile cache. Median time from running vp dev to the Local: line:
| Version | Startup | ready in |
|---|---|---|
| Before (1.2.0) | 188–217 ms | not printed |
| After | 163–205 ms | about 60 ms |
| After, compile cache off | 187–221 ms | about 73 ms |
vp dev starts 12–25 ms (5–13%) sooner. The first start fills the cache.ready in counts from when the bin script starts, so it leaves out the 100+ ms before that: the vp entry point, the JS resolver, and launching the Vite process.🤖 Generated with Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-vp-dev-ready-in-viteplus-dev.voidzero-docs.workers.dev (commit d334d7d)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
383bd8d to
8cabef8
Compare
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
`vp dev`, `vp build`, and `vp preview` ran Vite's `dist/node/cli.js` directly, skipping `bin/vite.js`. That script sets `global.__vite_start_time`, so `vp dev` never printed `ready in N ms` and scripts waiting for that line timed out after `vp migrate`. The script also maps `--debug`/`--filter` to `DEBUG`/`VITE_DEBUG_FILTER` and starts `--profile` sessions, so those flags did nothing under `vp`. The core build now ships Vite's `bin/vite.js` as `dist/vite/bin/vite.js` with its CLI import pointed at `../node/cli.js`, and the resolver runs it instead of `cli.js`. Closes #3053 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…script `command_build_vite_flags` checks that `vp build --debug config --filter 'loaded in'` prints exactly the matching `vite:config` debug line, and that `vp build --profile` writes `vite-profile-0.cpuprofile`. Vite's preview fails early on a missing `dist` only when it runs through `bin/vite.js`, so `vp preview` now stops there as `vite preview` does. `command_preview` records that error, then creates `dist` so its invalid-port step still reaches the port error. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Fold the `ready in 123 ms` redaction into DURATION_RE by allowing one optional space before the unit, and cover it in redact_unit.rs. No existing snapshot contains a spaced duration, so nothing else changes. - Guard the bin/vite.js rewrite with the `includes` check used elsewhere in build.ts and rewrite every occurrence with `replaceAll`. - Keep the full rationale in BUNDLING.md and trim the copies in build.ts, resolve-vite.ts, the build-artifact test, and the fixture. - Drop the build-artifact assertion on upstream's `__vite_start_time` line; the `ready in` snapshots cover it. - Filter the debug fixture on `no config file` so it needs no vite.config.ts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
7a27721 to
d334d7d
Compare
There was an error while loading. Please reload this page.
Vite+ 1.3 adds `create-vite-plus`, so `npm create vite-plus@latest` starts a project without the global `vp`. It adds `vp pm pkg` for editing `package.json` and `vp pm licenses list` for dependency licenses, and lets `vp env` take package-manager dist-tags such as `pnpm@latest-10`. It also makes `vp migrate` import rewriting much faster on large projects and makes `vp dev` print Vite's `ready in` line and honor `--debug`, `--filter`, and `--profile`. ### Features - Create a Vite+ project without installing the global `vp` through `pnpm create vite-plus`, `npm create vite-plus@latest`, `yarn create vite-plus`, or `bun create vite-plus`, which run `vp create` with the same arguments ([docs](https://viteplus.dev/guide/create#without-the-global-cli)) ([#3028](#3028), [#3048](#3048)), by @liangmiQwQ. - `vp pm pkg get`, `set`, `delete`, and `fix` read and update `package.json` through the detected package manager: npm 7.20.0 and later (`fix` from 9.8.0), pnpm 11.3.0 and later, and Bun 1.2.19 and later ([docs](https://viteplus.dev/guide/package-management#package-manifest)) ([#3020](#3020)), by @jong-kyung. - `vp pm licenses list` (or `ls`) lists dependency licenses through pnpm 7.17.0 and later, Yarn Classic, or Bun 1.4.0 and later, with `--json` for machine-readable output ([#3037](#3037)), by @jong-kyung. - `vp env` accepts npm dist-tags in package-manager specs: `vp env pin pnpm@latest-10` pins the exact version the tag points to, and `vp env default pnpm@latest-10` follows the tag on each use ([#3047](#3047)), by @liangmiQwQ. - Upgrade the bundled tools ([#3058](#3058), [#3078](#3078)), by @voidzero-guard[bot] and @fengmk2: - `[email protected]` to `[email protected]`. Rolldown adds the `output.charset` option and fixes several tree-shaking, code-splitting, and renaming bugs. - `[email protected]` to `[email protected]`, with fixes for browser mode, hook cleanup after a failing hook, and `--changed` with quoted file names. ### Fixes & Enhancements - Import rewriting in `vp migrate` is up to 14 times faster on large projects, for example 78 s to 5.6 s on Dify ([#2987](#2987)), by @fengmk2. - `vp dev` prints Vite's `ready in N ms` line, so scripts that wait for it no longer time out after `vp migrate`. `--debug`, `--filter`, and `--profile` now take effect in `vp dev`, `vp build`, and `vp preview`, and `vp preview` stops when the build output is missing, as `vite preview` does ([#3056](#3056)), by @fengmk2. - `vp staged` prints one result line per task, such as `✔ vp check --fix`, instead of the task list and Git progress. Warnings, errors, and rollback results stay visible, `--verbose` shows task output, and `--debug` keeps the full log ([#3060](#3060)), by @fengmk2. - After a successful upgrade, `vp upgrade` reminds you to run `vp migrate` in projects that use an older Vite+ version ([#3063](#3063)), by @KTrain5169. - The coding agent picker in `vp create` and `vp migrate` lists Claude Code under `AGENTS.md` and no longer offers a separate `CLAUDE.md` option. `--agent claude` and existing `CLAUDE.md` files still work ([#3055](#3055)), by @fengmk2. ### Docs - Recommend setting `runtimeOnFail: ignore` and `pmOnFail: ignore` in the project's `pnpm-workspace.yaml` for pnpm 11 and later, since pnpm does not read `runtimeOnFail` from its global config ([#3077](#3077)), by @liangmiQwQ. ### Chore - Speed up CI with ThinLTO native test builds, a pinned prepacked Windows SDK, and a precompiled std for trampoline tests, keep dependencies in Cargo caches, switch Linux runners, and update Windows build pins with Renovate ([#3026](#3026), [#2995](#2995), [#3009](#3009), [#3000](#3000), [#3073](#3073), [#3049](#3049)), by @fengmk2. - Stabilize CLI snapshots during slow package-manager downloads, isolate Vitest browser and UI server ports, skip slow snapshot cases on Linux and Windows, and remove duplicate Rust unit tests ([#3043](#3043), [#3061](#3061), [#3059](#3059), [#3057](#3057)), by @fengmk2 and @Brooooooklyn. - Upgrade Rust crates and JavaScript dependencies, including `[email protected]` and `[email protected]`, and remove unused catalog entries ([#1780](#1780), [#1782](#1782), [#1783](#1783)), by @renovate[bot] and @fengmk2. - Refine the release-manager guidance ([#3052](#3052)), by @fengmk2. ### Bundled Versions | Tool | Version | Source | Changelog | | --------------- | ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | | vite | `8.3.4` | [`b6c20f6`](vitejs/vite@b6c20f6) | unchanged | | rolldown | `1.2.14` | [`c9a8cda`](rolldown/rolldown@c9a8cda) | [1.2.14](https://github.com/rolldown/rolldown/releases/tag/v1.2.14) | | tsdown | `0.23.1` | [npm](https://npmx.dev/package/tsdown/v/0.23.1) | unchanged | | vitest | `5.0.5` | [npm](https://npmx.dev/package/vitest/v/5.0.5) | [5.0.5](https://github.com/vitest-dev/vitest/releases/tag/v5.0.5) | | oxlint | `1.88.0` | [npm](https://npmx.dev/package/oxlint/v/1.88.0) | unchanged | | oxlint-tsgolint | `7.0.2004` | [npm](https://npmx.dev/package/oxlint-tsgolint/v/7.0.2004) | unchanged | | oxfmt | `0.73.0` | [npm](https://npmx.dev/package/oxfmt/v/0.73.0) | unchanged | ### Upgrade ```bash vp upgrade ``` **Full Changelog**: v1.2.0...v1.3.0 --- Merging this PR will trigger the release workflow. --------- Co-authored-by: voidzero-guard[bot] <278573678+voidzero-guard[bot]@users.noreply.github.com> Co-authored-by: MK (fengmk2) <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
vp dev does not print "ready in N ms"
There was an error while loading. Please reload this page.