If your friend uses your work, academic ethics compels her to cite you, even if it is only as personal communication or similar. Currently, the typical type of citation would be unpublished or under review and this should be updated to your paper once it is published (the details may depend on field, citation style, and journal). Thus, it should be clear to everybody that your friend’s work fundamentally builds upon yours, and it would be absurd to consider your publication irrelevant due to your friend’s one. Of course, some reviewers and editors out there make absurd decisions, but that’s nothing I would consider likely and take into account.
You have to decide yourself how much you trust your friend to adhere to academic ethics (and cite you). At worst, you can contractually stipulate that any publication based on your work must cite you (or make you a co-author in the event that you do not publish). Either way, it is usually a good idea to have a discussion with everybody involved to clarify this and arrive at a common collaboration and publication strategy.