Is it safe to get your eyes dilated while pregnant? Or will it harm the baby

Generally safe. Occasional use of mild dilating eye drops, such as tropicamide for the purpose of ocular examination, should be safe for the baby during pregnancy. To limit the absorption into your circulation, close your eyes for a while after the drops are placed and wipe away any excess. Some people, especially when young, can have a full examination of the retina without dilation also.
Generally safe. Personally, i don't dilate pregnant patients unless there is a strong indication to do so (worried about some peripheral retinal problem). That said, there really isn't any evidence to suggest that these women cannot be dilated safely.