3.7.3 Import defaults / import.hx

since Haxe 3.3.0

Using the specially named import.hx file (note the lowercase name), default imports and usings can be defined that will be applied for all modules inside a directory, which reduces the number of imports for large code bases with many helpers and static extensions.

The import.hx file must be placed in the same directory as your code. It can only contain import and using statements, which will be applied to all Haxe modules in the directory and its subdirectories.

Default imports of import.hx act as if its contents are placed at the top of each module.

Related content