Vaccine question

Holly • Engaged. Dog mom. FTM-to-be. due Dec 22.
At 30 weeks ( I believe) they wanna do the DPT vaccine on me, so it passes to the baby(?). I cannot receive this vaccine as when they gave it to me as a baby, I was allergic to the pertussis vaccine part of it and will be unable to receive this so it doesn't cause an allergic reaction. Anyone else habe this problem? Wondering if they will give it to my baby after it is born instead or if there's a big reason they do it during pregnancy instead of as an infant like they did 20+ years ago.