Empty Angular CLI project: 180mb at node_modules???

Hi! This Angular newbie question. I've created an empty project using File > New Project > Angular CLI. While browsing source files, a top banner in red asked me to run npm install. So I did. After 1-2 minutes, my empty project got over 180mb of files inside node_modules!

Is this normal?

I understand that node_modules should not be committed, but what about deployment to production? Is any small project in Angular 2 supposed to use that much space?

0
1 comment

Yes, all official Angular tutorials now recommend using angular-cli, and even a very basic cli application comes with huge number of dependencies (mostly auxiliary ones, needed for transpiling/bundlig/testing/etc your application). And this is true for almost all modern JS frameworks:

 

The good news is that you don't need deploying all these dependencies to production - deploying the bundle generated when building a project is enough, see https://angular.io/guide/deployment

1

Please sign in to leave a comment.