Google has started kitting out an old Nokia factory in Vietnam in a bid to shift production of its Pixel phone away from China, two sources told Nikkei Asian Review.

The move comes in the middle of the US-China trade war, although one source said Google won't be leaving China altogether.

Google is not the only US company looking to become less reliant on China. Apple, Amazon, Microsoft, and more have all reportedly been drawing up plans to diversify their supply chain.

Visit Business Insider's homepage for more stories.

Google is planning a big production shift from China to Vietnam, Nikkei Asian Review reports.

Two sources familiar with the matter told Nikkei the company has already started work converting an old Nokia factory in northern Vietnam so that it can make its Pixel smartphones.

Google is not abandoning China completely, one of the sources said. "Google are likely to keep some activities inside China. The US company knows that if it is going to be serious about making hardware, it could never give up the massive Chinese market," the source told Nikkei.

Read more: Trump admits to having 'second thoughts' on his trade war with China

"However, they also understand that, due to rising costs and the macro-environment, they need to have production outside China for the long term in order to support their hardware manufacturing," they added.

This shift comes in the middle of the trade war between the US and China. President Donald Trump's administration has been levying tariffs on — among other things — consumer electronics.

Nikkei previously reported that Google, Amazon, Microsoft, Dell, and HP were all looking to move hefty chunks of their production away from China.

Apple is also reportedly seeking to diversify its production line outside of China, and game console producers Sony, Microsoft, and Nintendo wrote a joint letter in June warning of the "disproportionate harm caused by these tariffs to US consumers and businesses."

But the trade war isn't the only reason American tech companies are trickling away from China — rising labor costs are another factor.

Google was not immediately available for comment when contacted by Business Insider.