论webpack --profile 在开发中重要

在开发过程中 遇到 webpack build 失败的情况   如下图 

论webpack --profile 在开发中重要

npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! Exit status 2

无任何有效的错误提示 这种情况下  很难定位错误位置  

论webpack --profile 在开发中重要

 

这种情况下 在我们的打包命令中  加这么一句  输出打包信息的 具体情况   那么  很快就能定位到错误所在 

 

论webpack --profile 在开发中重要

 

 

这就 是我们打包编译的实时信息  很快问题就能迎刃而解