经过测试node12.2.0运行构建不出现内存溢出,请尽快升级!
现象
项目开发中,当项目过大的时候,node
内存溢出而停止build
项目,即是项目构建过程中频繁报内存溢出:FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
MacOS
ucf
修改package.json
"build":"node --max_old_space_size=9000 ./node_modules/.bin/ucf-scripts build"
uba
"build":"node --max_old_space_size=9000 ./node_modules/.bin/uba build"
Windows
ucf
"build2":"cross-env NODE_ENV=production node --max_old_space_size=9000 ./node_modules/ucf-scripts/bin/ucf-scripts build"
uba
"build2":"cross-env NODE_ENV=production node --max_old_space_size=9000 ./node_modules/uba-build/bin/uba-build"