Minimum node modules

What minimum node modules do I require for simple project? Can I remove most of them manually or should I do

npm install [some minimum requirements]

I mean, common, I have a simple site of 5-10 pages and one of them is making http requests to services, I really don't need node modules folder of 90 MB in my small project.

1 answer

  • answered 2018-01-11 20:35 Z. Bagley

    Your ng build will be a lot smaller for what you actually need to place on your server, only a few MB for a small website.

    By default npm install will install only your package.json dependencies (and their sub-dependencies), and Angular CLI is fairly minimalist as far as included packages (assuming you're using it, which is highly recommended). Also, you can remove testing similar to this answer: Completely removing tests from angular4, but not much else. The other piece is that you can also remove animations, even some of the other non-core items but unless your really tied for space I'd recommend leaving those packages alone.