有没有办法搬家节点模块 文件夹到公共(public)位置例如: C:\angular2 并在不同的应用程序中访问,例如: C:\angular2\angular2-快速入门 , C:\angular2\angular2-英雄之旅 ETC..
仅用于学习 angular2,我正在创建应用程序。 node_module 文件夹大约 80mb。因此,有一种方法可以将其放置在公共(public)位置,而不是每次复制和粘贴。
最佳答案
这是你可以做的。
我有 node_modules 目录存储在 C:\common 文件夹中
On windows:
Go to your project folder
mklink /j node_modules C:\common\node_modules
ng serve --preserve-symlinks
On Linux:
ln -s ~/common/node_modules node_modules
关于angularjs - 如何将 node_modules 文件夹移动到公共(public)位置以在所有 Angular2 应用程序中访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35183252/