To say that both are important is, I think, skirting the issue: it's a motherhood answer which is so obviously true that it doesn't shed much light on the question and doesn't help someone trying to decide where to make an investment.
In trying to answer this, we need to consider what is encompassed in the range between "cheap" and "expensive" in mikes and pre-amps, and also what we would exclude from that range. For example, would we consider the pre-amp in an on-board soundcard (e.g. soundblaster) and a plastic karaoke mike? Both are cheap, both sound horrible, and neither will produce creditable results if coupled with something high-end.
However, it seems that people are not factoring this low-end extreme into the discussion, with their references to, for example, SM57s. An SM57 is a budget mike; reliable, reasonable quality and versatile. So is, say, an AKG 770. Do you get 10 times the quality for a mike that's 10 times the price? Similarly with pre-amps. I don't expect a lot from the pre-amps in budget mixers (e.g. Behringer, Alto, Yamaha, Mackie and so on). I expect them to be better in interfaces such as Firepods etc. But not as good as in the dedicated units.
If we equate "cheap" with "bad" and "expensive" with "good" (not always valid), and measure somehow the quality difference between them, the element that has the greatest difference is the one to imvest in first. In other words, if there is a greater difference in quality between bad and good pre-amps than there is between bad and good mikes, then a pre-amp is the item to invest in to get greatest benefit. Conversely, if there is a greater quality range between bad and good mikes than there is between bad and good pre-amps, then a good mike is a more worthwhile investment.
It is my suspicion that the last is true (though I have no proof of this); that the difference between cheap and more expensive mikes is more pronounced than the difference between the various contemporary choices of pre-amps, and therefore I would go for a mike before a pre-amp.