简体   繁体   English

如何更新本地 node_module 依赖项并在另一个项目中重新加载?

[英]How to update local node_module dependency and reload in another project?

I have two local JavaScript projects.我有两个本地 JavaScript 项目。 Let's call them spinner and admin.我们称他们为微调器和管理员。

spinner is part of a dependency for admin. spinner 是 admin 依赖项的一部分。 However, there's a bug in spinner and I need to fix this bug.但是,微调器中有一个错误,我需要修复这个错误。 I thin I have fixed the bug, but I don't know how to reload this dependency without pushing to github and running npm update.我瘦我已经修复了这个错误,但我不知道如何在不推送到 github 并运行 npm 更新的情况下重新加载此依赖项。

Is there any way to either live reload the dependency or update the dependency locally to test my fix in the admin project?有什么方法可以实时重新加载依赖项或在本地更新依赖项以在管理项目中测试我的修复?

in admin's package.json在管理员的package.json

{
  "dependencies":{
  ...
  "spinner":"path/path/path",
  ...
  }
}

local-paths本地路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM