Still, I am able to generate an external “lime.js” or “openfl.js” file, bundling as much of the Haxe standard library as I was able, plus all the code for Lime and OpenFL. For one project, it increases the file size (since there is no dead-code elimination) but for multiple OpenFL projects, this could save a lot of file size.
OpenFL is designed to work within the size of the DIV element you give it, so the CSS of that element determines the size, it happens that our default HTML template scales 100% to fill the screen, but this not required.
You should be able to use multiple embeds of OpenFL on one page, to my knowledge, though I’m not actually sure whether that conflicts with the “modular” feature.
The way to enable the feature is to add
-Dmodular while building (or
<haxedef name="modular" />)