Closed sage-z closed 6 years ago
npm run build -- --debug
不压缩试试?内存不足感觉是压缩导致的。
@sorrycc 谢谢!不压缩确实可以,不过打出来的包有105M = =, 我要怎样做才可以压缩呢?
这么大的项目。。如果不需要保密的话可以把源码发我研究下怎么优化。(sorrycc#gmail.com)
压缩可以在 build 完成后单独做,用 uglifyjs 。
105M 可以从公用代码,优化依赖等方面多考虑考虑,应该有很多优化空间的。
@sorrycc 我把api摘出来发给你吧!谢谢了,主要不是异步加载页面么,然后每个页面都有一套,打包后一个页面大概2M,压缩后估计就300k吧,是sorrycc@gmail.com吧?
@sorrycc 很抱歉好像被当成垃圾邮件了
@sorrycc @Zegapaiz 我的项目也碰到你这个问题了,你有方法解决了吗?
我的项目有五六十个页面,使用npm run build打包不成功,报内存溢出错误 ,使用npm run build --max-old-space-size=8192无效