UglifyJs RangeError: Maximum call stack size exceeded
环境信息:
vue-cli@3.0
webpack@4+
yarn build工程时,报错:
RangeError: Maximum call stack size exceeded
at AST_Call.eval [as _eval] (eval at <anonymous> node_modules/uglifyjs-webpack-plugin/node_modu
les/uglify-js/tools/node.js:18:1), <anonymous>:9182:31)
at AST_Call.eval [as evaluate] (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_m
odules/uglify-js/tools/node.js:18:1), <anonymous>:8833:28)
at TreeWalker.eval [as callback] (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node
_modules/uglify-js/tools/node.js:18:1), <anonymous>:9196:62)
at TreeWalker.visit (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/ugli
fy-js/tools/node.js:18:1), <anonymous>:1437:25)
at AST_Return.walk (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglif
y-js/tools/node.js:18:1), <anonymous>:811:17)
at eval (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/tools/
node.js:18:1), <anonymous>:495:14)
at Array.forEach (<anonymous>)
at walk_body (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/t
ools/node.js:18:1), <anonymous>:494:15)
at eval (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:507:13)
at TreeWalker.visit (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:1438:31)
at AST_BlockStatement.walk (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:506:17)
at eval (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:869:23)
at TreeWalker.visit (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:1438:31)
at AST_If.walk (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:867:17)
at eval (eval at <anonymous> (/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:495:14)
at Array.forEach (<anonymous>)
如果在vue.conf.js中去掉uglifyjs-webpack-plugin插件就OK了,有哪位遇到相同问题的吗????
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
遇到了还没解决,换 terser-webpack-plugin 试试
丑化需要的内存太大了导致堆栈溢出了
在node_modules/.bin/webpack.cmd这个目录下加上这个--max_old_space_size=4096试试看