Uncaught RangeError: Array buffer allocation failed

The maximum heap size you can try is 2048MB - 16MB = 2032MB. Browsers currently don’t support allocating anything larger than that.

If you are running on a 32-bit browser, a HEAP size of 512MB or 768MB is about the maximum that is possible.

In the current version of UE4 the amount of assets you have on disk contributes to this limit, so reducing the number of assets on disk can help here. In a later UE4 version I believe this should no longer be the case.

With upcoming WebAssembly spec, these types of errors should hopefully be avoided in the future: A WebAssembly Milestone: Experimental Support in Multiple Browsers - Mozilla Hacks - the Web developer blog, though unfortunately that feature is not quite yet out of the door in browsers.