vx prune copies one project and the workspace packages it needs into a clean folder, with the lockfile cut to match. Your Docker build installs only what it ships, and a change in another app no longer busts the install layer.
Plugins
Plugins
A Docker image for one app should not install the dependencies of forty
others. And when another team bumps a package in their app, your image’s
install layer should not rebuild. vx prune cuts the workspace down to
what one project needs.
flowchart LR
W[whole workspace] --> P[vx prune @demo/web --docker]
P --> J[out/json: package.json files + pruned lockfile]
P --> F[out/full: the projects' source]
J --> I[install layer, cached]
F --> B[build layer]
I --> B
style J stroke:#c6f84e,stroke-width:2px
The output has only the two projects web needs. The root
package.json lists only their folders, and the lockfile drops every
entry nothing kept reaches:
Terminal window
$grep-cpicocolorsbun.lockout/json/bun.lock
bun.lock:2
out/json/bun.lock:0
$cdout/full && buninstall--frozen-lockfile
Checked4installsacross3packages (no changes) [2.00ms]
The pruned lockfile keeps the package manager’s own layout, so a frozen
install accepts it as is.
--docker splits the output in two. json/ holds only what the install
reads, so Docker caches that layer until a dependency of this app
changes. full/ holds everything else.
pnpm(), npm() and yarn() work the same way. The same plugin keys
each task on its own project’s dependencies, which
Lockfile-aware keys covers. Every rule and
refusal is in the
vx-lockfile README.
vx prune --production leaves out the workspace packages only dev dependencies pull in, and strikes them from the copied manifests and lockfile, so the image that runs your app installs frozen without them.
One plugin line puts every vx run on GitHub: a job summary with the failure first, a check run on the commit, and a cache scope that keeps pull requests from writing what main reads.
With @vzn/vx-schedule-history, vx starts the longest chain first and packs tasks by the memory they really used. vx history shows what it learned, task by task.
Turborepo, Nx and other product names are trademarks of their owners. vx is not affiliated with or endorsed by them.