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

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?

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

Yep. Thanks, Ibilion!

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