Add import to class through macro

We are trying to add an import definition to a class with a build macro, but cannot find a way to do this… Anyone got experience with this?

Basically, imports can be contained by module (your .hx file), not a class.
There is an API for module definition which gives you a way to add imports into it:
https://api.haxe.org/haxe/macro/Context.html#defineModule

And I’m not sure if you can add it into an already existing module. But I’m may be wrong.

Very nice: will check it out!