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
New users of pnpm frequently ask me about the weird structure of `node_modules` that pnpm creates. Why is it not flat? Where are all the sub-dependencies?
Copy file name to clipboardexpand all lines: docs/cli/add.md
+15
Original file line number
Diff line number
Diff line change
@@ -211,6 +211,21 @@ Install a package globally.
211
211
212
212
Only adds the new dependency if it is found in the workspace.
213
213
214
+
215
+
### --allow-build
216
+
217
+
Added in: v10.4.0
218
+
219
+
A list of package names that are allowed to run postinstall scripts during installation.
220
+
221
+
Example:
222
+
223
+
```
224
+
pnpm --allow-build=esbuild add my-bundler
225
+
```
226
+
227
+
This will run `esbuild`'s postinstall script and also add it to the `pnpm.onlyBuiltDependencies` field of `package.json`. So, `esbuild` will always be allowed to run its scripts in the future.
0 commit comments