BEIJING—China’s exports surged anew last month on the back of resilient demand, defying many economists’ expectations for a slowdown from the trade fight with the U.S.

Demand for Chinese goods grew in developed and developing markets, from the U.S. to India, according to customs data released Thursday.

“It’s not just the U.S., wherever you...