Meghan Trainor has hit back at people who have attacked her over her recent weight loss.