Skip to main content
Version: 9.x

配置

pnpm 使用 npm 的配置 格式。因此,你应该以与 npm 相同的方式设置配置。例如,

¥pnpm uses npm's configuration formats. Hence, you should set configuration the same way you would for npm. For example,

pnpm config set store-dir /path/to/.pnpm-store

如果未配置存储,则 pnpm 将自动在同一驱动器上创建一个存储。如果你需要 pnpm 跨多个硬盘驱动器或文件系统工作,请阅读 常见问题

¥If no store is configured, then pnpm will automatically create a store on the same drive. If you need pnpm to work across multiple hard drives or filesystems, please read the FAQ.

此外,pnpm 使用与 npm 进行安装相同的配置。如果你有一个私有注册表并且 npm 配置为使用它,则 pnpm 也应该能够授权请求,而无需额外配置。

¥Furthermore, pnpm uses the same configuration that npm uses for doing installations. If you have a private registry and npm is configured to work with it, pnpm should be able to authorize requests as well, with no additional configuration.

除了这些选项之外,pnpm 还允许你使用所有标志参数(例如 --filter--workspace-concurrency)作为选项:

¥In addition to those options, pnpm also allows you to use all parameters that are flags (for example --filter or --workspace-concurrency) as options:

workspace-concurrency = 1
filter = @my-scope/*

请参阅 config 命令 了解更多信息。

¥See the config command for more information.