简体   繁体   English

如何减小node_modules文件夹的大小

[英]How to reduce the size of node_modules folder

我已经使用npm完成了Angular 2应用程序,当该应用程序只有1 mb大小时,node_modules文件夹消耗了大约90 mb,所以至少在IIS中发布时,是否有可能减小node_modules文件夹的大小?

I would suggest using grunt-package-minifier 我建议使用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. 最初,我从node_modules剥离了所有package.json,README等,但是将基本的JavaScript文件保留在CommonJS模块加载器可以使用的结构中。

Also have a look at reduce-node-modules-bloat.md 还可以看看reduce-node-modules-bloat.md

Hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM