I don't think the west will defend taiwan, but it won't matter. If china invades, their economy collapses, because no one will want to send cargo ships or oil tankers into a war zone, and industrial and ag production in china proper stops for the six months-1year of the conflict, and the population starves or riots. Probably the most the us will do punitively is to embargo china with a naval blockade. That's just as bad if not worse.
It's hard to imagine chinese leadership doesn't know this.