Compiles an OpenFL project using the haxe-modular library. When a button is clicked, a new module is loaded from the server at runtime.
haxe-modular modifies the behavior of the Haxe compiler to split the generated JavaScript into separate modules when the Bundle.load() method is used.
Add the modular Haxelib to your project.xml file:
<haxelib name="modular"/>Run the following commands in your project directory:
npm init -y
npm install haxe-modular --save-devThat's it! You don't need to do anything special to build and run.
lime test html5 -debug- haxe-modular 0.14.0 or newer
- Lime 8.0.0 or newer
- OpenFL 9.2.0 or newer
Sample created by Josh Tynjala, the author of Feathers UI and a member of the OpenFL leadership team.