pnpm rebuild

别名: rb

Re-runs the lifecycle (build) scripts of installed dependencies. The rebuild keeps the dependency groups that the last install included.

pnpm rebuild [<pkg>...]

With package names, only those packages are rebuilt. Without them, every dependency that requires a build is rebuilt.

A rebuild script in package.json overrides the command, and an rb script overrides pnpm rb. See pnpm pm.

配置项#

--pending#

Rebuild only the packages that were not built during installation, such as under --ignore-scripts.

pnpm rebuild --pending

--recursive, -r#

此命令在 monorepo 的每个包中运行一个命令。

--no-bail#

See --no-bail.

--filter <package_selector>#

阅读更多有关过滤的内容。