Unfortunately, "melee weapon attack" means an attack with a weapon in melee. In the same way that the "ranged weapon attack" components of Sharpshooter feat work with any thrown weapon, but the "attack with a ranged weapon" requirement for the -5 hit +10 damage only works with darts.
Right, so its sort of hyphenated differently...."Melee weapon-attack" not "Melee-Weapon attack"....interesting. Also goes to show how subtle some house-ruling can be...seen a couple of games that let the Barb reckless attack with a thrown axe (largely I think because there's been loads of flying enemies and it keeps said Barbarian from having a strop)