I should help out a little here with trans terminology because I think oversimplification might cause confusion.
Transvestite is kind of/sort of a slur. It's really more outdated language that folks should try to avoid, similar to "transsexual". The reason for this is because of the word's link to something called "transvestic fetishism". One thing trans people get frequently accused of is using their gender/presentation as a means to trick people into having sex with them. Transvestic fetishism is the belief that someone's arousal is increased by wearing perceptibly feminine clothing. This is different from the disproven concept of autogynephilia, which is where it's believed that a trans woman transitions specifically because she's turned on by her own body.
Needless to say, a significant majority of trans people aren't going to be terribly thrilled being compared to that. Hence why people have drifted away from using the word "transvestite" and have replaced it with "cross-dresser" for those who are cis men who occasionally wear feminine clothing but have no intention or desire to transition. It should also be noted that it's frequently trans women who are attacked with slurs, and people tend to forget trans men exist and are valid as well.
Some words that are definite slurs for trans people (and again, most of these are related to trans women) are words like tranny, trap, ladyboy, he/she, shim, shemale, genderbender, dickgirl, and use of the pronoun "it". As you can see, a lot of those are horrifying. I wouldn't begrudge anyone for saying that transvestite is a slur when it's continued to be used against trans people who desire to transition away from their assigned gender at birth.
And that's why I mentioned that gender and presentation are nuanced concepts that aren't necessarily easy to solve on a message board.