If the pregnant woman fears for herself or for her baby for the reason of fasting during Ramadhaan; then she should eat and upon her is to make up for them only. Her state in that is similar to the state of the one who is sick and is unable to find strength to fast – or that he fears some harm upon himself.
Allaah The Most High says:
((And whosoever is sick or is upon a journey; then the period is made up from other days…)) [Soorah Al-Baqarah: 185]
Likewise is the case for the breastfeeding woman if she fears for herself when she breastfeeds her child during Ramadhaan. Or that she fears upon her child if she were to fast and not breastfeed him – then she is to eat and upon her is to make up for them only.