I am trying to lower final shipping build size by going through what has been done for Tappy Chicken.
Official Tappy Chicken posting for HTML5 build says to go to UE4Game.Target.cs and enable and disable options that they have specified, and this setting is already wrapped up inside the conditional statement that checks if the target environment is on iOS platform. So I have uncommented this statement so that these settings get applied regardless of the platform it is on. Then when I packaged the Tappy Chicken game on HTML5 with unnecessary plugins disabled, lowest build size it gets to is around 63MB.
Below is the code in SetupGlobalEnvironment function of UE4Game.Target.cs:
//if (Target.Platform == UnrealTargetPlatform.IOS)
// to make World Explorers as small as possible we excluded some items from the engine.
// uncomment below to make a smaller iOS build
UEBuildConfiguration.bCompileRecast = false;
UEBuildConfiguration.bCompileSpeedTree = false;
UEBuildConfiguration.bCompileAPEX = false;
UEBuildConfiguration.bCompileLeanAndMeanUE = true;
UEBuildConfiguration.bCompilePhysXVehicle = false;
UEBuildConfiguration.bCompileFreeType = false;
UEBuildConfiguration.bCompileForSize = true;
How I understand it is that if I enable bCompileForSize it should be building .js files minified, but which in my case doesn’t seem to do that. And I think we gzip after .js files are minified to lower the build size even further, right? Is there an extra that I need to take in order to minify .js files? Or any other suggestions for lowering build size even lower? I did build it in shipping version.