With source it depends - a lot of sources are very similar, but a very good source can add more to a system than an amplifier. Amps should be able to drive the speaker, obviously, but between usual suspects I would buy the best deal. With preamps, so people use passives, some bypass a pre, while some search for a really good pre. A really good active pre is worth it, IMO, but in its absence, I wouldn't fuss too much over the pre but get the best deal, preferably have both pre and power of the same brand to have synergy. But if you are strapped for funds, buy a source with a volume control and bypass the pre, upgrade to a good pre when you get the cash.
Cables, upgrade from basic stock cables. Keep out cables that do something wrong. Lowest priority
Putting shun mook diamond resonators under components makes a massive difference to the system, not something an amp or source could add. It makes things more 3d, increases soundstage, cleans up bass, separates vocals from the music.
Do a lot of work on power.
Also, my personal experience is that having computerised audio makes one listen to more music, because downloads are easier to get and click through, unlike searching for CDs in the closet. So think about that when you buy the source.
Room acoustics are important if your room has a problem. Even otherwise, but some tend to spoil their sound because of the traps so be careful there.