During the Qing dynasty (1636–1912), cotton and silk production flourished in Wuxi. Trade increased with the opening of ports to Shanghai in 1842, and Zhenjiang and Nanjing in 1858. Wuxi became a center of the textile industry in China. Textile mills were built in 1894 and silk reeling establishments known as "filatures" were built in 1904. Wuxi was remained the regional center for the waterborne transport of grain. The opening of the railways to Shanghai and to the cities of Zhenjiang and Nanjing to the northwest in 1908 further increased the exports of rice from the area. Jinkui xian merged into Wuxi County with the onset of the Republic in 1912.