Skip to content

yarn link

Terminal window
yarn link

This command will add a resolutions entry in the current project manifest (package.json at the top-level workspace), linking it to a remote workspace.

This is useful when developing packages that depend on each other: you can link them together to test your changes without having to publish them first.

If the --all flag is set, Yarn will link all workspaces from the target project to the current one. By default, private workspaces will be skipped, but this can be toggled using the --private flag.

If the --relative flag is set, the paths will be stored as relative paths rather than absolute paths.

Options

OptionDescription
--allLink all workspaces from the target project to the current one
--privateAlso link private workspaces
--relativeUse relative paths instead of absolute paths