link-module-alias
link-module-alias copied to clipboard
Deleting node_modules also clears out all linked directories
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
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.