yarn unlink

取消之前建立的符號連結

To remove a symlinked package created with yarn link, yarn unlink can be used.

在之前建立連結的資料夾中執行 yarn unlink

要取消在目前開發中的專案中的套件連結,只需使用 yarn unlink [package], 你將需要執行 yarnyarn install 來重新安裝之前連結的套件。

Continued example from the yarn link documentation: assume two folders react and react-relay that are located next to each other with react linked into the react-relay project:

$ cd react
$ yarn unlink
yarn link vx.x.x
success Unregistered "react".
$ cd ../react-relay
$ yarn unlink react
yarn link vx.x.x
success Unregistered "react".

請參見︰

  • yarn link: symlink a package for local development.