Pre-2015 or so, yes, of course there was outsourcing, but it was honestly a major PITA in most cases. Most communication was done in conference calls, very little group video communication, lots of async chats, etc.. Any type of work where you needed a fairly frequent black-and-forth with various team members was rarely outsourced - the type of work that was outsourced was the type that was more likely to have static requirements.
But now, though, there is basically no difference working with a colleague who's working from home in the same city vs. working from home thousands of miles away (as long as there is good timezones overlap). And that is a change that only happened around the beginning of the pandemic, and I've personally seen companies much more willing to outsource because of it, and they're outsourcing a much wider type of work (e.g. brand new dev work that is frequently updated based on usage metrics) than they would in the past.