Find the root of a multi-package repo with Yarn workspaces
yarn add find-workspace-root
import findWorkspaceRoot from 'find-workspace-root';
const rootDir = await findWorkspaceRoot(/** intialDir [default=process.cwd()]**/);
Find the root of a multi-package repo with Yarn workspaces
yarn add find-workspace-root
import findWorkspaceRoot from 'find-workspace-root';
const rootDir = await findWorkspaceRoot(/** intialDir [default=process.cwd()]**/);