  The nature of dark matter (DM) is an open question in cosmology, despite its
abundance in the universe. While elementary particles have been posited to
explain DM, compact astrophysical objects such as black holes formed in the
early universe offer a theoretically appealing alternate route. Here, we
constrain the fraction of DM that can be made up of primordial black holes
(PBHs) with masses $M \gtrsim 0.01 M_\odot$, using the Type Ia supernova Hubble
diagram. Utilizing the Dyer-Roeder distance relation, where the homogeneous
matter fraction is parameterized with $\eta$, we find a maximum fractional
amount of DM in compact objects ($f_p$) of 0.50 at 95\% confidence level
(C.L.), in the flat $\Lambda$CDM model and 0.49 when marginalising over a
constant dark energy equation of state. These limits do not change when
marginalising over cosmic curvature, demonstrating the robustness to the
cosmological model. When allowing for the prior on $\eta$ to include $\eta >
1$, we derive $f_p < 0.32$ at 95$\%$ C.L., showing that the prior assumption of
$\eta \leq 1$ gives a conservative upper limit on $f_p$. When including Cepheid
calibrated supernovae, the 95\% C.L. constraints improve to $f_p < 0.25$. We
find that the estimate for the Hubble constant in our inference is consistent
with the homogeneous case, showing that inhomogeneities in the form of compact
dark matter cannot account for the observed Hubble tension. In conclusion, we
strongly exclude the possibility that PBHs with stellar masses and above form a
dominant fraction of the dark matter.
