WorkspaceConfig: { nohoist?: WorkspacePattern[]; packages?: WorkspacePattern[] }

An alternative configuration for workspaces.

Type declaration

  • Optionalnohoist?: WorkspacePattern[]

    Designed to solve the problem of packages which break when their node_modules are moved to the root workspace directory - a process known as hoisting. For these packages, both within your workspace, and also some that have been installed via node_modules, it is important to have a mechanism for preventing the default Yarn workspace behavior. By adding workspace pattern strings here, Yarn will resume non-workspace behavior for any package which matches the defined patterns.

    Supported by Yarn. Not supported by npm.

  • Optionalpackages?: WorkspacePattern[]

    An array of workspace pattern strings which contain the workspace packages.