So in the long run, Taiwan needs another method than their own conventional military strength to defeat a Chinese invasion. Preemptive surrender is one option, of course, to stop the destruction of war. But are the Taiwanese really prepared to give up their freedom?
Basing American and/or Japanese forces on the island of Taiwan before a war is an option, too, if it can be done without provoking an immediate Chinese invasion.
Getting China to no longer want to invade Taiwan is another way out. Although that might require regime change in Peking, so I'm not saying this is an easy solution. But it is in theory a way out of Taiwan's dilemma.
Building nuclear weapons is another option for Taiwan. Of course, openly doing that could lead to a quick Chinese invasion attempt or even preemptive nuclear attack to disarm Taiwan. So if this option is chosen by Taiwan, it would have to be done quietly so that China only suspects the capability which Taiwan can mention after the deed is done, either openly once done or during a crisis. I don't think matching Israel's ambiguous stance is an option, since Israel has the advantage of conventional military superiority in any short conventional war, at least.
This quiet, I suppose:
A government official revealed that Taiwan had developed a IRBM (Intermediate Range Ballistic Missile) with a range of 2,000 kilometers. The missile was successfully tested three years ago. Nothing was said about production. Seven years ago, Taiwanese officials discussed developing a 2,000 kilometer range IRBM, and manufacturing 30 of them[.] ...
Taiwan does not have nuclear weapons, although the nation possess the technical resources to develop such weapons, and perform the engineering work to make these nukes function in a ballistic missile.
Thirty longer range ballistic missiles don't do much to affect the balance if armed with conventional warheads. But having them ready to go in case Taiwan gets nuclear warheads to mount on them would speed up deployment and reduce that dangerous period between open intent to have a nuclear deterrent and having nukes to deter an enemy.
Which makes our "accidental" shipment to Taiwan of nuclear warhead triggers a couple years ago (I noted it as an aside in this post) seem less of an accident than a way to let Taiwan get a good look at the trigger and/or increase Taiwan's deterrence by injecting some uncertainty about just what Taiwan has.