umi build
If you want to set the option when running the command --max-old-space-size=8192
, you can modify the script command package.json
in the file build
to the following:
"build": "node --max-old-space-size=8192 ./node_modules/umi/bin/umi build"
This command will umi build
use the Node.js process settings --max-old-space-size
option to set the maximum heap size before running. This may use more memory during the build process, which may speed up the build, but may also make the build process more memory-intensive on the computer.
Note that --max-old-space-size
when using the option you need to make sure you have enough memory available on your machine, otherwise it may cause issues with the build process.