Preheat Oven: Preheat your oven to 350°F (175°C) and line a muffin tin with paper cupcake liners.
Prepare the Cupcakes:
In a medium bowl, whisk together the flour, baking powder, and salt.
In a large mixing bowl, beat the butter and sugar together until light and fluffy. Add the eggs one at a time, beating well after each addition. Mix in the vanilla extract.
Gradually add the flour mixture to the butter mixture, alternating with the milk, beginning and ending with the flour mixture. Mix until just combined.
Divide the batter evenly among the cupcake liners, filling each about 2/3 full.
Bake for 18-20 minutes, or until a toothpick inserted into the center comes out clean. Allow the cupcakes to cool completely on a cooling rack.
Make the Custard Filling:
In a medium saucepan, heat the milk over medium heat until it just begins to simmer.
In a separate bowl, whisk together the sugar, cornstarch, and egg yolks until smooth.
Gradually pour the hot milk into the egg mixture, whisking constantly to prevent curdling.
Return the mixture to the saucepan and cook over medium heat, stirring constantly, until it thickens and comes to a boil. Cook for an additional 1-2 minutes, then remove from heat.
Stir in the vanilla extract and butter until smooth. Transfer the custard to a bowl, cover with plastic wrap (pressing it directly onto the surface of the custard to prevent a skin from forming), and refrigerate until cool.
Prepare the Chocolate Ganache:
Place the chocolate chips in a heatproof bowl.
In a small saucepan, heat the heavy cream over medium heat until it just begins to simmer.
Pour the hot cream over the chocolate chips and let sit for 2-3 minutes. Stir until smooth and glossy. Allow the ganache to cool slightly.
Assemble the Cupcakes:
Once the cupcakes are completely cool, use a small knife or a cupcake corer to remove the center of each cupcake, making a small well for the custard filling.
Fill a piping bag or ziplock bag with the cooled custard and pipe it into the center of each cupcake.
Spoon the chocolate ganache over the top of each cupcake, allowing it to drip down the sides.
Serve: Allow the ganache to set before serving. Enjoy these delightful Boston Cream Pie Cupcakes as a perfect treat for any occasion!