Build OpenFL with HXML config

I want to set up hot reloading and code watching to openfl (target js) project. I have found this module for webpack -, but it requires to use hxml file as entry point for compliling app.

This client.hxml

-lib lime
-lib openfl
-cp ./Source
-main Main
-js ./Export/html5/bin/Test.js

throws following error:

/usr/local/lib/haxe/lib/lime/5,5,0/lime/graphics/ImageBuffer.hx:111: characters 18-36 : js.html.ArrayBuffer should be
/usr/local/lib/haxe/lib/lime/5,5,0/lime/graphics/ImageBuffer.hx:111: characters 18-36 : For function argument 'src'
/usr/local/lib/haxe/lib/lime/5,5,0/lime/graphics/ImageBuffer.hx:112: characters 33-38 : should be Null<Int>
/usr/local/lib/haxe/lib/lime/5,5,0/lime/graphics/ImageBuffer.hx:112: characters 33-38 : should be Int
/usr/local/lib/haxe/lib/lime/5,5,0/lime/graphics/ImageBuffer.hx:112: characters 33-38 : For optional function argument 'elements'

Is it possible to compile openfl project through hxml file?

OpenFL generates .hxml files which it then passes to Haxe. You can find them inside your game target’s export folder.


These files assume the project directory to be the working path when you compile.

Thank you, Justin.
I couldn’t setup webpack to work properly and chose haxe-watchify npm library. I’ve made couple of fixes and it works fine.