Once https://github.com/JuliaLang/julia/pull/47695 is merged, we could use that mechanism for packages that support it. https://github.com/KristofferC/PGFPlotsX.jl/pull/306 can serve as a template for what should be done.