I know this is necroposting but i wrote solution for you:
Code:
hooksecurefunc("CompactUnitFrame_UpdateStatusText", function(frame)
if frame:IsForbidden() then return end
if frame.statusText then return end
if not frame.healthBar.value then
frame.healthBar.value = frame.healthBar:CreateFontString("$parentHeathValue", "OVERLAY")
frame.healthBar.value:SetPoint("CENTER", frame.healthBar)
frame.healthBar.value:SetFont('Fonts\\FRIZQT__.ttf', 12, "OUTLINE")
end
local cur, max = UnitHealth(frame.displayedUnit), UnitHealthMax(frame.displayedUnit)
if cur > 0 then
frame.healthBar.value:SetFormattedText("%d - %.0f%%", cur, 100*cur/max)
else
frame.healthBar.value:SetText("")
end
end)