You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
👀
Copy file name to clipboardexpand all lines: docs/repo-docs/reference/prune.mdx
+10
Original file line number
Diff line number
Diff line change
@@ -207,3 +207,13 @@ Customize the directory the pruned output is generated in.
207
207
Default: `true`
208
208
209
209
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