COMMUNITY

Differentiate .hx files depending on target/platform - eg. Test.js.hx, Test.cpp.hx etc


(Jonas Nyström) #1

There seems to be an undocumented Haxe compiler feature that makes it possible to write target/platform specific .hx files by using something like the following filename pattern: Test.js.hx, Test.cpp.hx
https://twitter.com/mknol/status/1084941474914058240

I can’t get it to work, though. Any clues?


(Valentin Lemière) #2

The Test.target.hx needs to be in the same folder as Test.hx to be selected, that might be the issue?


(Jonas Nyström) #3

Yep. Thanks, Ibilion!


(Zicklag) #4

Oh, that’s a nifty feature. We should put that in the manual sometime.