Pular para o conteúdo principal
Versão: 10.x

pnpm-workspace.yaml

pnpm-workspace.yaml defines the root of the workspace and enables you to include / exclude directories from the workspace. Por padrão, todos os pacotes de todos os subdiretórios estão incluídos.

Por exemplo:

pnpm-workspace.yaml
packages:
# specify a package in a direct subdir of the root
- 'my-app'
# all packages in direct subdirs of packages/
- 'packages/*'
# all packages in subdirs of components/
- 'components/**'
# exclude packages that are inside test directories
- '!**/test/**'

O pacote raiz é sempre incluído, mesmo quando os curingas de localização customizado são usados.

Catalogs are also defined in the pnpm-workspace.yaml file. See Catalogs for details.

pnpm-workspace.yaml
packages:
- 'packages/*'

catalog:
chalk: ^4.1.2

catalogs:
react16:
react: ^16.7.0
react-dom: ^16.7.0
react17:
react: ^17.10.0
react-dom: ^17.10.0