The Defiant class corvette, officially an escort vessel, began development in 19 BBY as a small, highly-powered, heavily-armed warship intended to defend the Republic against the Confederacy of Independent Systems. The prototype, Defiant was completed in 18 BBY under the new Galactic Empire, but the project was abandoned, primarily because the Clone Wars had ended and the new Empire, instead of focusing on defense, was mainly concentrated on securing it's grip on the galaxy. Also, several design flaws turned up, nearly destroying the Defiant during its initial shakedown cruise.
The Defiant prototype was pulled out of storage in 2 BBY when the Rebel threat emerged. After several upgrades, the ship was deemed worthy of use and more ships of the class were constructed, although several would fall in the hands of the Rebellion.