All the modern semiconductor industry, including the discovery of transistors and of solar cells, has its origin in the research done during WWII, mostly at Bell Laboratories, to make improved detectors for the military radars, which lead to the development of the technologies needed to make pure germanium and pure silicon and of semiconductor diodes made with them.
Without DoD money, an electronic computer of the complexity of ENIAC would have been built only many years later. Nevertheless, both ENIAC and the British cryptographic electronic machines (and the Atanasoff computer) have been enabled by the invention of various kinds of electronic digital counters during the decade that has preceded WWII (mostly in UK), all of which had been invented for the use in experiments for the study by physicists of radioactive substances and of cosmic radiation, so there are also decisive civilian contributions (like also the discovery of nuclear fission as a precondition for the nuclear bombs and reactors).