For the past 20 years, Taiwanese businessman Jimmy Chu, the head of a company that makes elevators and forklifts, has been spending most of his investments, and time, in mainland China.
Some 80,000 Taiwanese companies like Mr Chu's have poured a total of $120bn into the country in the past two decades, making Taiwan one of the biggest investors there and a key driver of China's economic growth.
But Mr Chu will soon open two new factories in Taiwan at a total investment of $70m, the biggest he has made at home in years.
He is among an increasing number of Taiwanese shifting at least some of their operations away from China - either to South East Asia or Taiwan - and adjusting their investment strategies in the mainland.
One of the main reasons is a significant rise in Chinese wages. Some estimate salaries have doubled in the past six to seven years. Companies are also now required to pay into Chinese workers' health insurance and pension plans.
"Labour costs in China are rising dramatically each year and the pace is scary," says Mr Chu, chief executive of Fair Friend Enterprise Group.
"Demand for workers is also very high. With more jobs to choose from, Chinese factory workers now switch jobs whenever they can get a higher salary. That makes it difficult for us to find workers with enough experience.
"So the cost of manufacturing in China is higher now, sometimes higher than Taiwan," he says.
These changes have global implications, economists say.
"Many companies from other countries that are in China manufacturing products for export will [also] have to go elsewhere," says Sun Ming-te, an economist at the Taiwan Institute of Economic Research.
"After all, the Taiwanese understand China much better, can communicate in the same language, and we are good at keeping production costs low. So if even we can't survive, how can others?"
Taiwanese investors were one of the first to invest in China in the 1980s, despite political tensions at the time. According to China's Commerce Ministry, Taiwan is the fourth biggest source of Foreign Direct Investment (FDI) for the country.
But government statistics show Taiwan's investments in mainland China in 2012 dropped 17% from the year before to US$11bn, a three-year low. One of the biggest drops came from the electronic components sector, which was down by 44%.
Foreign firms that had relied on China's cheap labour for a competitive advantage are having an especially hard time, analysts say.
"Companies that make garments, and toys are moving from Guangdong province. They're finding it difficult to survive there, so they're moving to places like Vietnam," says Tony Phoo, a Taipei-based economist at Standard Chartered bank.
Last year, Taiwanese investments in Malaysia, Vietnam and Thailand increased by 44%, doubled or quadrupled, respectively.
Money is also returning to Taiwan. In the past five years, Taiwanese investors with money in China invested $6.5bn in their home country - averaging $1.3bn a year - creating more than 24,000 jobs.
In 2006, when the government began tracking the trend, the total invested was just $76m.
Those coming back are motivated by Taiwan's low wages, which, if factoring in inflation, are back at the same level they were 15 years ago for entry level jobs.
In the past, Taiwan's wages were much higher than those in China. But now, Chinese blue-collar wages are approaching those of their counterparts in Taiwan and in some sectors and big cities in China white collar workers can expect to earn even more than their island neighbours.
For governments like Taiwan's, which has long grappled with the layoffs, factory shutdowns and other negative effects of the exodus to China, this is a good time to lure some of them back.
Taiwan is offering a slew of incentives, including cheaper land, relaxing restrictions on hiring migrant workers, preferential loans, and help tapping new markets, such as in the Middle East and Africa.
"We hope this will help Taiwan's economy," said Chiu Yi-cheh, director-general of the Department of Investment Services.
"Our initial goal for 2012 was to attract $50bn New Taiwan dollars ($1.69bn) in investments; we've surpassed that.
"In the next two years, we hope to attract NT$200bn. The tax revenue will help our overall economy and 84,000 jobs will be created in the next five years."
The companies going to South East Asia tend to be labour intensive ones. But the firms reinvesting in Taiwan typically make higher-value-added goods and need specialist skills, says Mr Phoo.
The world's biggest contract electronics manufacturer, Taiwanese-owned Foxconn, or Hon Hai, is one of those. It employs about one million people in China, but it is slowing the pace it recruits new workers there.
It recently announced plans to hire 5,000 technicians to work in two plants in Taiwan. It will be one of the group's largest hiring sprees here in recent years.
The Taiwanese technicians will research and build factory robots, so that the company, which makes smartphones and computers for top brands such as Apple and Dell, can further reduce dependency on increasingly expensive Chinese workers.
The transformation of the Chinese economy is another major factor. Once hungry for overseas investors to build factories and provide jobs, Chinese firms can now make many of the same products.
So the question for Taiwan and other countries in similar situations is, how can they continue to benefit from China's growth?
One obvious way is to sell to China, rather than just making products there. But whereas South Korea and Japan have been able to sell vehicles to China, Taiwan does not have many things to sell that the mainland cannot already make.
Instead, Taiwanese manufacturers are shifting into other sectors and becoming owners of department stores, hotels, and shopping malls. Taiwan's financial services industry is also doing more business in China; investment rose more than a third last year.
So China is expected to remain a top destination for international investors, and despite its higher wages, it remains a relatively cheap place to manufacture by international standards.
The factories Mr Chu sets up in Taiwan will make more sophisticated machinery than his factories in China, but he is not planning to abandon the mainland entirely.
After all, his eight factories and 4,000 workers in China generate 22% of his company's revenue.
"I'm not closing down in China," says Mr Chu. "I will expand there if needed in the future."