我们正在开发两个模块,这取决于另一个模块。与A -› B
和C -› B
我现在挖了一些解决方案:
来自项目A,B的{h1>npm link ../projectC
../projectC
在父文件夹中(在prod上没有安装npm)postinstall
npm install ../projectC
../projectC
在父文件夹中(在prod上没有安装npm)npm install
答案 0 :(得分:0)
So the solution was simply npm link
.
You can, in your project C npm link
(make sure you have a package.json
).
Then in your projects A and B:
npm link module-projectC
package.json
Then you will be able to code comfortably while in development, and do a npm install
in production scenarios.