There’s a package that allows you to write something like:
@export function foo() ...
InlineExports.jl