我的项目中有serval自定义包(它是我的代码,这些包不在npm中),每个都在他自己的目录中,并且有自己的私有存储库。
在dev:我可以使用package.json中的相对路径来使用不同包中的包:(和npm链接)
"dependencies": {
"customModule": "file:../other_module_relative_path"
}
在制作中:我刚刚使用git存储库:
"dependencies": {
"customModule": "git://github.com/.."
}
所以我必须维护2个不同的package.json 并在部署时切换它们
有没有更好的办法呢?