Is it possible to precompile (with PrecompileTools) code from a package extension?

I was trying to use PrecompileTools to make a pre-compilation workflow for a package extension but ran into issues where because the weak-dependency is not part of the module its name is not defined.

Is it possible to precompile (with PrecompileTools) code from a package extension?
where would the @compile_workload go in the codebase?
Is there a precompile target to list in the project.toml to list extra packages that are needed for precompilation?

Figured it out,

I can add the @compile_workload block direction into the extension module.

i.e.

module MyPackageExt
using MyPackage, MyOtherPackage
# ....
using PrecompileTools
@compile_workload begin
# ....
end
end
4 Likes