I opened the default ‘puzzle’ game example and then I did a WebGL build set to ‘Shipping’ and ‘By the book’ for it’ settings. This produced 15+ mb of gzipped js.
UE4Game-HTML5-Shipping.jsgz 10.5 mb
UE4Game-HTML5-Shipping.js.symbolsgz 4.1 mb
UE4Game-HTML5-Shipping.js.memgz 1 mb
Plus a 247 mb MyProject2.datagz but I assume that is textures and can be easy to reduce.
But the other UE4Game-HTML5-Shipping I assume is all of the compiled code required for the game to run. And this is just the puzzle example, very little code I assume. So this close to the minimum download size.
If the starting size for a UE4 webgl build is 15 mb gzipped. That is pretty large. Comparatively, I have a WebGL build a simple Unity application where the gzipped js is less than 5 mb.
Is there some additional setting or way to get Unreal to produce smaller WebGL builds? Minus the .data files which I assume I just need to remove resources to get smaller.
Or is this just the current state of UE4 web build?