An old Toys R Us store in Milwaukee is now home to Engine & Transmission Exchange, a remanufacturer for car parts.

Meanwhile, six dead malls across the U.S. are either in the process of being turned into or have been revamped as massive manufacturing plants and logistics hubs. The empty Euclid Square Mall in Euclid, Ohio, for example, is under construction to become home to a new Amazon e-commerce fulfillment center. And that's after Amazon already moved into a new facility where Randall Park Mall used to sit in North Randall, Ohio.

These types of projects — converting a shuttered retail space into industrial complexes — have historically been hard to do, and are still somewhat rare to see through from start to finish, David Egan, head of the industrial and logistics research division at commercial real estate services provider CBRE, told CNBC. "That said, I think we will see more of it. [The trend] will grow slowly, but it will grow."

CBRE found 24 such examples of properties across the country that were once home to retailers but now have turned — or are in the process of being turned — into a warehouse or some sort of supply chain center. Since 2016, at these 24 locations, 7.9 million square feet of retail space has been converted into 10.9 million square feet of industrial space. The second figure is larger because, in many instances, a developer will tear down the existing structure and build a bigger building on that dirt, said Lisa Denight, a research analyst at CBRE.

The trend of retail to warehouse makes sense for a handful of reasons. More and more retail sales are moving to the internet, so retailers and third-party logistics providers like UPS and FedEx alike are finding they need more real estate devoted to handling that surge in online orders. With that, more store closures are taking place. "You look at this matchup ... of things taking place ... and it's perfect," Egan said.

Some of the biggest publicly traded landlords in this space including Prologis, Duke Realty and Monmouth have also called out a frequent disconnect between supply and demand: There are more companies looking for homes for their e-commerce operations in many cities than there are spaces for them.

CBRE found examples of shuttered Walmart, Target, and local grocery store and cinema chains being converted into industrial uses, in cities ranging from Houston to Tampa, Florida. In Memphis, Tennessee, a Sam's Club store was shut and now is home to a Sam's Club e-commerce fulfillment center.

Still, there are a handful of obstacles that tend to arise before these deals can come to fruition.

Retail assets tend to have greater value than industrial assets, Egan said. So that tends to draw some pushback from those people who lent money toward properties when they were valued as malls or shopping centers, for example.

Then, zoning issues often arise, as a retail property has to be rezoned for an industrial-type use, he said.

Third are tax complications: A mall tends to generate property, income and sales taxes for the surrounding community, whereas an industrial building isn't going to bring in sales taxes. "You can see why, if the community is adamant about it, it's not going to happen," Egan said.

But with the demand for warehouse space not expected to slowdown anytime soon, deals like the one where Amazon took over an old mall in Ohio will likely only become more of the norm.

It's been forecast that roughly 247 million square feet of industrial space was going to be delivered in 2018, according to real estate services firm JLL, which hasn't released its final report for last year. That would be a high not seen since 2007.

"Every indication we have is that our customers need more space and they're really tight," Prologis CEO Hamid Moghadam said recently on a call with analysts. Prologis is Amazon's biggest landlord.

Meanwhile, some analysts say it's inevitable more than 300 underperforming malls will shut across the U.S. That's as more department stores go dark. And brands like Gap, Express, Gymboree and Victoria's Secret are closing locations.

"E-commerce is a threat for certain types of retail real estate, but it is increasing demand for industrial space," Green Street Advisors analyst Eric Frankel said. E-commerce-related activity has boosted the demand for warehouse space across the country by roughly 35 percent over the past two years, he said.

WATCH: Walmart flopped in this country in South America - here's why