经过测试node12.2.0运行构建不出现内存溢出,请尽快升级!

现象

项目开发中,当项目过大的时候,node内存溢出而停止build项目,即是项目构建过程中频繁报内存溢出:FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

MacOS

ucf

修改package.json

  1. "build":"node --max_old_space_size=9000 ./node_modules/.bin/ucf-scripts build"

uba

  1. "build":"node --max_old_space_size=9000 ./node_modules/.bin/uba build"

Windows

ucf

  1. "build2":"cross-env NODE_ENV=production node --max_old_space_size=9000 ./node_modules/ucf-scripts/bin/ucf-scripts build"

uba

  1. "build2":"cross-env NODE_ENV=production node --max_old_space_size=9000 ./node_modules/uba-build/bin/uba-build"