Show pageBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Build Project that Needs to Use a Lot of Memory ====== Normally, we build angular project with <code> ng build --prod --base-href /YOUR_BASE_HREF/ --env=prod </code> but ng command uses at most 4GB ram to build the source, and it might not enough for some big project. We can use node command directly to build it. Go to your project directory and try: <code> node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod --base-href /YOUR_BASE_HREF/ --env=prod </code> where 8192 is the memory you assign for node.js to build the project, you might assign even more if needed. ng/build_project_that_needs_to_use_a_lot_of_memory.txt Last modified: 2019/05/15 16:17by chongtin