link-module-alias icon indicating copy to clipboard operation
link-module-alias copied to clipboard

Deleting node_modules also clears out all linked directories

Open aequabit opened this issue 5 years ago • 1 comments

Step 1:

"_moduleAliases": {
    "~lib": "lib"
},

Step 2:

yarn

Step 3: Entire ~lib directory gets cleared

This happened after removing the module because it had already cleared out my source directory two times, the first time permanently wiping out unpushed changes AND deleting my .git folder without even having any module links to my project root.

Yarn: 1.13.0 Node: 11.15.0

aequabit avatar Aug 08 '19 18:08 aequabit

In my case, I have linked src directory.

"_moduleAliases": {
    "~src": "./src"
}

Doing yarn clear whole src directory. I have lost hrs of works 2 times. one with @ and another using this one.

chaudharykiran avatar Sep 20 '19 09:09 chaudharykiran