China's biggest e-commerce companies are hungry for groceries.

Amazon (AMZN)'s move to swallow Whole Foods for $13.7 billion grabbed attention in the U.S., and the internet giant has also been dabbling in cashier-less grocery stores. But experts say China is already ahead of the curve.

Alibaba (BABA), the country's biggest online shopping company, has introduced a grocery store that has both a virtual and physical presence. It quietly started rolling out the stores two years ago "because no one was watching and we wanted to try it out," Vice Chairman Joe Tsai said at a conference in Hong Kong last week.

Related: What Amazon knows: 'The war for retail will be won in groceries'

Using the brand name Hema, the company wants a slice of China's rapidly growing online food market. The industry is expected to be worth $180 billion by 2020, according to specialist research organization IGD.

"China's definitely leading in terms of market size and the adoption of online grocery," said Shirley Zhu, Asia program director with IGD. But Alibaba and Amazon also "both prove the point that there's still a role for brick and mortar stores to play in e-commerce," she said, especially in fresh produce.

Costco + Amazon + Chipotle

Hema shoppers have to download the store's app and link it to an account on Alibaba-affiliated digital payment platform Alipay. They can shop online and get fresh groceries delivered, or they can have the produce cooked by Hema chefs and brought to their home ready to eat.

Alternatively, shoppers can go to the physical store and buy goods in person at the cashless checkout counters. They can also get their groceries cooked into a meal on the spot (for carryout or eating in the store's food court).

It's kind of like Costco (COST), Amazon (AMZN) and Chipotle (CMG) rolled into one store.

The rise in online shopping often signals the end of brick and mortar stores. But industry experts say that an in-store experience goes a long way in building customer trust and that -- in the case of groceries -- physical stores can also be used as warehouses.

"The important thing about this (Hema) concept, which is something Amazon must learn when they acquire Whole Foods, is that we are now using the retail locations for fulfillment," Tsai said.

Walmart stores as warehouses

That's something China's second largest e-commerce company, JD.com (JD), has already mastered.

"Unlike books, you can't simply keep fresh apples in thousands of warehouses throughout the country and wait for demand to catch up," said Josh Gartner, JD's vice president of international corporate affairs. "Having a network of brick-and-mortar stores with existing local demand makes the model immediately scalable."

Through a couple of strategic partnerships, JD's network includes about 350 physical stores doubling as fulfillment centers for online grocery orders.

The tech company bought Walmart's Chinese e-commerce site, known as Yihaodian, last year. It now hosts the U.S. retailer's various products, including groceries, on its own e-commerce platform.

Roughly 130 of Walmart's more than 400 brick-and-mortar stores in China double as warehouses for JD. That's a lot more than Hema's 20 locations, most of which are in big cities like Shanghai and Beijing.

Related: Cool or creepy? Walmart to deliver food and put it in fridge

JD already covers a good deal of territory. It took a significant stake in Chinese grocery chain Yonghui Superstores two years ago and uses about 200 of its locations for deliveries.

The e-commerce company says its partnerships help it deliver most online grocery orders within 30 minutes, thanks to a fleet of couriers navigating Chinese cities on scooters or motorbikes. Hema also promises a similar speedy deliver for customers within 3 kilometers (2 miles) of a store.

With a growing number of smartphone users and rising population of young, middle-class shoppers, analysts say China's online grocery market shows no signs of slowing down.