I found out that my Angular 4 project is around 300 MB on disk. I also figured out that the folder node_modules is the culprit for this size. Should I keep this folder out of the repository to save repository space and avoid long data traffic when updating source files on a repository? Thanks a lot.
Asked
Active
Viewed 696 times
0
-
2the node_modules folder is ignored by default in most .gitignore configs – Jota.Toledo Dec 04 '17 at 22:57
-
this is a dup of https://stackoverflow.com/questions/18128863/should-node-modules-folder-be-included-in-the-git-repository/ – Jota.Toledo Dec 04 '17 at 22:59
1 Answers
3
node_modules
should be ignored when the project is uploaded to CVS, doing the opposite defies the purpose of a package manager.
While package-lock.json
(introduced in NPM 5) should be commited, it locks currently installed dependencies and allows to replicate the state of node_modules
on npm i
.

Estus Flask
- 206,104
- 70
- 425
- 565