The key question is whether the people of Taiwan want to unify with China?
If the answer is
NO . . . then any attack would be opposed. Taiwan is on the island of Formosa an 65-70% of Formosa is mountains and forests. The rest is flat plain with thousands of villages, towns and cities. The Taiwan Army would first fight inside the cities and towns and then eventually fall back to the mountains and pound the landing areas with missiles and artillery.
The island would be destroyed and with it all the industry China wants.
The other issue is that as China attacks Taiwan, China itself is vulnerable. its factories, roads and bridges would be destroyed. it's refineries and oil fields would go up in flames. The US Navy would blockade oil into Cina (China imports over 75% of its oil).
But if the answer is
YES . . . . then a war is unnecessary. Over the last few decades, support for unification has been growing inside Taiwan. I think it stands at close to 1/3rd right now want a political union with China.
A war is stupid and China is not stupid.