0

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.

enter image description here

Estus Flask
  • 179,509
  • 61
  • 360
  • 499
AlvaroCryptogram
  • 378
  • 3
  • 15

1 Answers1

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
  • 179,509
  • 61
  • 360
  • 499