Unless you've been living way off the grid for the past decade, you can't have missed that we have entered the e-commerce era, and if brick-and-mortar retail chains want to remain relevant, they have little choice but to become omnichannel operators. Target (NYSE:TGT) management gets it, and it is making the investments required. The proof is in the company's comp sales, which are growing. That's the good news. The bad news, as reflected in its third-quarter earnings miss, is that all the supply chain and customer-service upgrades the retailer's making to avoid being crushed by Amazon and its ilk are pushing its costs higher and squeezing its margins.

In this segment from MarketFoolery, host Chris Hill and Motley Fool Asset Management's Bill Barker consider the changes to the business model of retail, and whether Target's short-term pain will deliver long-term gains.

A full transcript follows the video.

This video was recorded on Nov. 20, 2018.

Chris Hill: We're going to talk about the retail ugliness that is happening right now. We saw this coming last week, when Home Depot put up an amazing, stellar quarter, and the stock dropped anyway. Now, we've got retailers putting up less than stellar quarters and getting punished for it. We'll start with Target. Third quarter results coming in below expectations. You can look at what Target is doing, in terms of their investment in the supply chain, and think, long-term, that makes sense. I applaud that, and that's fine. But in the short-term, that means that Target's costs are going higher. The stock down 9% this morning.

Bill Barker: The stock going into today was up 22% for the year and up 37% from this time last year. Let's pull that part a little bit. One thing that allowed that was the stock being beaten up as much as it was. There was a lot of frustration with retail going into last summer 2017. A lot of stocks in the retail space really bottomed around then. Looking at it from that point, everything is going much better. They haven't been destroyed, as of yet by Amazon.

But Target's numbers show what the cost of that non-destruction is. They had comps of 5.3%, which is pretty good. But there are costs associated with meeting customers in all the places they want to be. Target's investments in order online, pick up in store or curbside, these are good things for the customer, things the customer wants, but they are not easy to deliver without raising your costs. Either you're going to have to raise your prices, which is not particularly viable in as competitive a retail environment as we have today; or, you're going to take on those costs, and your margins contract. That's where Target is today.

Hill: Brian Cornell, the CEO, was very clear that despite the higher costs in the third quarter, he has a great deal of confidence going into the holiday quarter, not just in terms of consumer spending, but in terms of Target's ability to deliver on that. I think Brian Cornell has rightfully earned the confidence of the shareholders, given his track record there. You're hopefully taking some solace in Cornell's confidence.

Barker: I do. What I take less confidence in is how you construct the numbers in a way that makes it a truly exciting investment opportunity. Traditional retail, let's go back a few years, where you're going to get your comps of mid-single-digits at a well-run place, and then you're going to open up more stores. Your total sales are going to rise maybe in the low-double-digits. Because you're opening more stores, you're getting bigger, your margins are going to improve by a little bit. Then, you're going to buy back some shares. And when you combine all that and get down to the bottom line, you've got growth of earnings per share, hopefully, in something like the mid-double-digits, like 15%, if you do everything right. Quarters aren't always going to go right, but that's the game plan.

Well, now, are you really building more stores? If you're not building more stores, are you going to see your margins improve? You're not really growing more than the rate of the economy. If that's the case, you still might be able to buy back your shares. And Target did a bit of that over the quarter. But really, they were buying them back at what appears now to be higher prices than they go for after today. Maybe they'll buy back more shares at a lower price over the coming quarter. But if you start getting at, where are the comps, and that's the main number that's going to determine your rate of growth, you're talking mid-single-digits.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Bill Barker owns shares of HD. Bill Barker is an employee of Motley Fool Asset Management, a separate, sister company of The Motley Fool, LLC. The views of Bill Barker and Motley Fool Asset Management are not the views of The Motley Fool, LLC and should not be taken as such. Chris Hill owns shares of AMZN. The Motley Fool owns shares of and recommends AMZN. The Motley Fool has the following options: short February 2019 $185 calls on HD and long January 2020 $110 calls on HD. The Motley Fool recommends HD. The Motley Fool has a disclosure policy.