Tell her "no hitting" and walk away. Totally ignore her and let her pitch a fit. Lock yourself in your room if you need to. She is doing it to get a reaction, who knows what exactly, but some sort of attention or make Mommy do something. She is clearly frustrated and that will only increase with a second child. Be consistent. If it repeats, put her in her crib or a safe room with no toys and leave her for 2-3 minutes. The bigger deal you make, the more likely she is to continue.
Also, pay attention to the circumstances that lead to hitting, so you can try to circumvent them. Don't give her an opportunity to work herself up to hitting. OF course every child will get frustrated, but if you know she does it in her fussy times before nap or when you hav ebeen on teh phone and ignoring her for 10 minutes or whatever. Try to prepare her better before situations arise and don't let them escalate to hitting.
In calmer times, talk about "nice hands" and "using words." Ask her if she wants to hurt Mommy. The librarian should be able to direct you to some books - "Hands are not for hitting" is a title I recall.
If you hit her, she gets the message that is what people do when they are frustrated, hurt, or angry. Model an appropriate response, and behave how you expect her to behave.
I think kids try this every so often to see if it works for them. My daughter tried it around 18 months, again close to 3 years, and again recently at 4 years (not hitting people but banging her fist into the wall in anger). It has never happened more than 3 or 4 times as I used the above strategy. I always ask my daughter, "Does Mommy hit you? Then don't hit me" or "Would you like your friends to do that to you?" Talk now about how girls who hit, can't play with the baby. She probably is too young to really get that the baby is coming, although she may sense some anticipation/anxiety in you. But she will learn the mantra of hit=no baby, hit=no baby, hit=no baby."
Also ask you daycare provider to be more specific about how they handle such behavior. Even if she doesn't do it there, she may see it there. Make sure they are on top of it, and apply your approach for discipline for consistency. Maybe they can even talk about nice hands in "circle time."