Skip to content

Commit 21fe2bc

Browse files
docs(prune): document how prune differs from pnpm deploy (#10022)
### Description I received a question about how `pnpm deploy` and `turbo prune` differ and figured I would document my findings since they both server similar purposes. ### Testing Instructions 👀
1 parent 8fa7f85 commit 21fe2bc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/repo-docs/reference/prune.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,13 @@ Customize the directory the pruned output is generated in.
207207
Default: `true`
208208

209209
Respect `.gitignore` file(s) when copying files to the output directory.
210+
211+
### Comparison to `pnpm deploy`
212+
213+
While both `turbo prune` and [`pnpm deploy`](https://pnpm.io/cli/deploy) are used to isolate packages in a monorepo, they serve different purposes and produce different outputs.
214+
215+
Where `turbo prune` generates a partial monorepo, `pnpm deploy` generates a directory that only contains the contents of the target package.
216+
217+
The `pnpm deploy` generated directory has a self-contained `node_modules` with hard linked internal dependencies.
218+
This results in a portable package that can be directly copied to a server and used without additional steps.
219+
The repository structure is not retained, as the focus is on producing a standalone deployable package.

0 commit comments

Comments
 (0)