- 1/2 cups all-purpose flour
- 2 cups whole milk
- 2 teaspoons pure vanilla extract
- 2 teaspoons pure coconut extract
- 2 cups (4 sticks) unsalted butter, room temperature
- 2 cups confectioners’ sugar
Whisk together flour, 1/2 cup milk, vanilla, and coconut extract in a small saucepan until combined. Place saucepan over medium heat and gradually whisk in remaining 1 1/2 cups milk. Cook, whisking, until mixture comes to a low boil; reduce heat to low and continue to whisk until mixture thickens and big bubbles form and pop, 2 to 3 minutes.
Transfer mixture to a small heatproof bowl. Let cool to room temperature, whisking occasionally as it cools to make smooth.
In the bowl of an electric mixer fitted with the whisk attachment, mix butter on medium until soft and creamy, 2 to 3 minutes. Gradually add confectioners' sugar; beat on high until light and fluffy, 5 to 7 minutes.
Gradually add milk mixture. Increase speed to medium-high and whisk until buttercream is light and fluffy, scraping down bottom and sides of bowl as necessary with a rubber spatula. Frosting can be stored in an airtight container at room temperature for up to 2 days.