Is it safe to smoke?

I’m posting this anonymously and for a friend for obvious reasons. A good friend of mine recently found out she’s pregnant. It’s a very loved and very wanted pregnancy. However it was not a planned pregnancy so up until she discovered she was pregnant she continued to smoke weed. Since the confirmed pregnancy she stopped smoking and drinking immediately. Since then she hasn’t been able to eat a thing. Not a single thing, she can’t even keep water down. She has used marijuana legally the last few years to help combat her intense nausea that she gets every evening. This was at a doctors recommendation after they could find nothing causing the nausea and no other medication helped. After she passed out recently from dehydration her husband took her to the ER. The doctors there told her that she could continue to smoke marijuana in small amounts to help her keep food down if the medications don’t work. Naturally she was wary so she checked with her family doctor who said the same thing. In my opinion if she has several doctors giving her the go ahead she should be fine. However she’s terrified and I understand this. She’s hoping for some personal experience from women who have gone on to have healthy pregnancies despite marijuana use. She smoked last evening after getting home from her hospital stay and was able to keep some dinner down, but she’s afraid to do it again. Her pregnancy is at risk if she doesn’t eat though :(