Does the Ranger’s Favoured Foe Ability from Tasha’s work with Cantrips?

So I have an idea for a wisdom based Horizon walker. I was thinking of taking shillelagh and produce flame from the druidic warrior fighting style. Produce flame is purely so I at least have ONE ranged option when it is necessary but I would primarily be a melee fighter. I know hunter’s mark works with only weapon attacks but I noticed that the description of favoured foe only states "when you hit with an attack roll", not with a "weapon attack."

So my question is just would produce flame be able to benefit from and apply the damage from favoured foe?

Thanks!