Depends on the medication. This is definitely something to discuss with the doctor before becoming pregnant. Or if you are already pregnant, talk to him/her ASAP.
Treatment of SVT in pregnancy may affect the fetus. For this reason, pharmacological treatment is best reserved for those with haemodynamic changes, severe symptoms or sustained arrhythmias. Non-pharmacological treatment including vagal manoeuvres such as carotid massage, Valsalva manoeuvre and facial ice immersion are well tolerated and safe for both mother and fetus.
Beta-blockers have been used extensively in pregnancy, to treat maternal hypertension and cardiac problems, and are generally well tolerated. Verapamil, a calcium channel-blocking agent, is also effective and poses no risk to the fetus.
As ireneo stated, speaking to your Dr about your options is best. Best of luck to you!