China's exports surged in June, buoyed by orders for chips to fuel the global AI boom ​and automobiles, deepening producers' reliance on overseas buyers ‌as policymakers in the world's No 2 economy continue to grapple with how to boost demand at home.The ‌stronger-than-expected trade performance keeps China ⁠on track to post a surplus ‌topping $1tn for a second straight year, with factories sustaining ‌sales despite slowing growth in major economies and trade frictions with Washington.Exports climbed 27% from a year earlier in US dollar value terms, ⁠customs data showed on Tuesday, their best performance in four months, outpacing the 19.4% gain in May and an 18.2% rise forecast by economists.Imports jumped 36%, compared with a 27.4% gain the month before, a five-year high. Economists had forecast growth of 24% for June."Continued export strength, mostly driven by AI, points to a better second half, coupled with a more expansionary policy mix, accelerated fiscal spending and mild monetary easing, as well as a de-escalation of the situation in the Middle East, which will benefit China through lower oil prices," said Xu Tianchen, a senior economist at the Economist Intelligence Unit in Beijing."But domestic demand remains a drag. Retail ​sales remain pretty flat and fixed asset investment was negative last month."China's monthly car exports topped 1mn for the first time in June, data showed, which risks heightening tensions with partners such as the European Union. Meanwhile, China sold to the world 32bn integrated circuits.China's ⁠trade surplus came in at $125.6bn in June, up from $105.4bn the previous month. The year-to-date trade gap now stands at $575.98bn versus $585.96bn ​last June, despite imports having grown faster than exports for several consecutive months.With policymakers still short of a fix for a protracted property crisis that has weighed on domestic demand for several years, Chinese manufacturers appear to have few good options beyond selling overseas.The ratio of annual exports to total manufacturing sales hit 24% over the first four months of this year, according to a recent report by Gavekal Dragonomics, a consultancy, the highest level since China's accession to the World Trade Organization in 2001. In 2019, the ratio stood at 18.3%, rising to 22.3% last year."That would be considered high for a small export-focused country; for the world's second-largest economy, it is remarkable," the report said."I think exports will remain strong in the second half of the year," said Zhiwei Zhang, chief economist at Pinpoint Asset Management. "Meanwhile, it also puts further pressure on the trade tensions between China and its trading partners, Europe in particular."The surge in global ‌AI investment is helping the world's top manufacturer offset ⁠the export hit many had expected from the Middle East turmoil.China also appears to be drawing down energy stockpiles rather than subjecting its ⁠producers to higher prices. The world's top energy buyer's June oil ⁠imports hit their lowest level since October 2016, according to Reuters calculations. Year-to-date natural gas purchases are also down 3.4% from a year earlier, suggesting China is relying on coal to make up the difference. Coal imports jumped an annual 29% in June.Robust global demand for chips means pockets of the $20tn economy will keep humming along while other parts remain in the doldrums.Julian Evans-Pritchard, head of China economics at Capital Economics, said the strong import figure "should not be taken as evidence that domestic demand is booming.""As with exports, surging semiconductor prices are playing a key ​role in pushing up import values," he added.Imports from South Korea, a major chip manufacturer, rose 85% from a year earlier last month, the data showed, with purchases from Taiwan, another big semiconductor manufacturer, up 41.1% over the same period.Customs Vice-Minister Wang Jun said he was confident the production powerhouse's exports would remain resilient into the second half of the year, despite external pressures, singling out technology exports.Separate manufacturing activity data for June, released late last month, showed overseas demand was beginning to recover, but factory-gate prices continued to fall as companies cut prices to win business from customers squeezed by higher energy costs linked to the Iran conflict.The problem is that technology exports alone cannot prop up an entire economy, at least not for long.Sluggish domestic demand is expected to be a drag, with gross domestic product ‌forecast to have grown by just ​4.5% year-on-year in April to June, cooling from 5.0% in the first quarter, according to a Reuters poll. GDP data is due to be released on Wednesday.