1

I've created a new Angular 4 project with the angular-cli...

ng new angular-tour-of-heroes

...and I wonder why the node folder is so heavy - between 160 and 200 Mo - and how to reduce it?

I understand that a framework needs a lot of vendors and code to work... but I was accustomed to small sized javascript projects, and even if it's a development environment, why should I need non-minified files for vendors that only angular uses (and test folders, and readme...)?

screenshot

31piy
  • 23,323
  • 6
  • 47
  • 67
Ecorce
  • 123
  • 2
  • 11

1 Answers1

1

The node_modules folder size of the application and the size of the built application (so what you will deploy) is really not the same thing.
First, modules declared in devDependencies are not included in and secondly tools as webpack allows to minimize the final build size.
For example my node_modules Angular app does about 200 Mo too but after executing ng build, the built application (by default in dist folder) does about 12 Mo.

davidxxx
  • 125,838
  • 23
  • 214
  • 215