Officially, even then it consisted of people of deveral nations: constituting nations of the original Kingdom of Serbs, Croats and Slovenes were, unsurprisingly, Serbs, Croats, Slovenes, but plenty of other nations lived in it. Towards the latter stages, there was an attempt to make everybody a member of a "Yugoslav nation", but we all know how that turned out driven by many conflicting interests. Official polls had a large number of "Yugoslavs" (obviously a product of the state, but large here meaning probably 15-25%), but you had minority nations like Hungarians and Slovaks that lived in the area for centuries.
While I agree nation is a made up concept, for many a nation it goes back a long time, and it did usually start by differentiating by language (and religion was quickly added into the mix esp in the area). Still, the fact that we can track movement of "nations" between states (eg. large number of Serbs moved to Hapsburg monarchy as Ottomans invaded "Serbia", basically becoming a majority there, thus leading to seccesion movements that led to WW1), means that it can and has been defined for quite a while.
While German nation was practically defined as Prussia led unification efforts, there was a concept of Germanic tribes a long time ago.
And yes, language was the main denominator, but as civilizations developed, more was added into the mix. After all, language was certainly territorial to begin with, so it is a derived attribute by itself.