Add support for --pre-js option in HTML5 builds


We (GameAnalytics) would like to add support for HTML5 builds but at the moment there don’t seem to be an option for using the --pre-js (only --js-library) option when building for HTML5. We need this as we have a native library written in JavaScript and we got this to work in our plugin for the Unity3d game engine using the --pre-js which they seem to have available. The change shouldn’t be very big only a few lines of code. I looked at the source code for building HTML5 and the code seems to check for .js extension when using PublicAdditionalLibraries in your .build.cs file which will then use the --js-library option and like Unity does you could just check for .jspre extension for example to use the --pre-js option for emscripten. I hope to hear back from Epic regarding this soon.

Lead SDK Developer @ GameAnalytics