Should “node_modules” folder be included in the git repository

前端 未结 9 1347
闹比i
闹比i 2020-11-28 02:41

I\'m wondering if we should be tracking node_modules in our repo or doing an npm install when checking out the code?

9条回答
  •  感情败类
    2020-11-28 03:25

    One more thing to consider: checking in node_modules makes it harder / impossible to use the difference between dependencies and devDependencies.

    On the other hand though, one could say it's reassuring to push to production the exact same code that went through tests - so including devDependencies.

提交回复
热议问题