Mediates resistance to pathogens which are sensitive to stilbenes. 4-coumaroyl-CoA + 3 H(+) + 3 malonyl-CoA = 4 CO2 + 4 CoA + trans-resveratrol Phytoalexin biosynthesis; 3,4',5-trihydroxystilbene biosynthesis; 3,4',5-trihydroxystilbene from trans-4-coumarate: step 2/2. Homodimer. Belongs to the thiolase-like superfamily. Chalcone/stilbene synthases family.