如果我的项目中包含较小的项目,并且较小的项目使用main.json中的包,则当我要构建较小的项目之一(作为微服务)时,必须复制整个node_modules目录从父目录进入分发目录?还是我可以以某种方式构建我想要的?这是发展的好方法吗?
main
-- package.json ( contains all packages used by all projects )
-- tsconfig.json ( contains project references for sub projects )
-- node_modules
-- subproject1
-- package.json ( contains only run scripts )
-- tsconfig.json
-- subproject2
-- package.json ( contains only run scripts )
-- tsconfig.json (edited)
我喜欢为每个子项目分别使用package.json和tsconfig.js文件的想法。因为,