pnpm-workspace.yaml
pnpm-workspace.yaml
定義了 workspace 且能夠讓您設定工作區中包含/排除的目錄。 預設情況下,包含所有套件中的所有子目錄。
範例:
pnpm-workspace.yaml
packages:
# all packages in direct subdirs of packages/
- 'packages/*'
# all packages in subdirs of components/
- 'components/**'
# exclude packages that are inside test directories
- '!**/test/**'
即使使用了萬用字源自定義位置,根目錄中的套件還是會被包含在內。
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