Sridhar Paiya
Sridhar Paiya

Reputation: 478

How to reduce the size of node_modules folder

I have done Angular 2 application using npm, when the app has just 1 mb size, the node_modules folder consumes around 90 mb,so Is there any possibility to reduce the node_modules folder size, at least while publishing in IIS?

Upvotes: 12

Views: 14339

Answers (1)

Bhushan Gadekar
Bhushan Gadekar

Reputation: 13805

I would suggest using grunt-package-minifier

Initially I strip all the package.json, README etc. from node_modules but keep the essential JavaScript files in a structure that can be used by a CommonJS module loader.

Also have a look at reduce-node-modules-bloat.md

Hope this helps

Upvotes: 4

Related Questions