[英]Prepare node_modules for distribution?
Are there ways to make node_modules more compact for client side usage? 有没有办法使node_modules更加紧凑以供客户端使用? For example with nodewebkit? 例如,使用nodewebkit?
I think about removing unecessary files and minification. 我考虑删除不必要的文件和缩小。
Thanks! 谢谢!
我认为您可以使用npm install --production
,因此您不会为生产环境安装不必要的模块,例如:grunt,gulp,mocha等。当然,这取决于是否使用npm install --save-dev
安装开发模块。 npm install --save-dev
Yes, there are ways. 是的,有办法。
Do the following in this order: 按此顺序执行以下操作:
npm install --production
npm dedupe
to flatten the hirarchy and remove duplicates npm dedupe
以简化层次结构并删除重复项
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.