Ingredients
Method
Step-by-Step
- Preheat the oven to 350°F. Grease a 9-by-13-inch light-colored metal baking pan, then line the bottom with parchment if desired.
- Whisk the flour, sugar, cocoa powder, baking soda, and salt in a large bowl until evenly combined.
- Place the Dr. Pepper, butter, and chocolate chips in a saucepan over medium heat. Stir until the butter and chocolate melt, then remove the pan from the heat.
- Cool the chocolate mixture for about 5 minutes. Whisk in the eggs, buttermilk, and vanilla, then pour the wet mixture into the dry ingredients.
- Stir just until no dry streaks remain. Do not overmix. Pour the batter into the prepared pan and spread it evenly.
- Bake for 26 to 30 minutes, or until the center springs back lightly and a toothpick inserted in the middle comes out with a few moist crumbs.
- Make the frosting while the cake bakes. Melt the butter, Dr. Pepper, and cocoa powder in a saucepan over medium heat, whisking until smooth.
- Remove the frosting mixture from the heat. Gradually whisk in the powdered sugar and vanilla until smooth, then stir in the pecans if using.
- Pour the warm frosting over the warm cake and spread it gently to the edges. Let the cake cool for at least 30 minutes before slicing.
Notes
Use room-temperature eggs and buttermilk for a smooth batter. For clean slices, cool the frosted cake completely before cutting. Store covered at room temperature for up to 2 days or refrigerate for up to 5 days.
