Preheat oven to 350F. Line a muffin tin with muffin papers.
Mix the butter, sugar, and vanilla together on medium mixer speed until fluffy (5 minutes). With the mixer running on medium, add the eggs, one at a time, and incorporate completely.
Separately, combine the flour, baking powder, and salt.
With the mixer running on medium-low, add a third of the flour mixture to the butter-sugar mixture. Add a third the coconut milk. Repeat twice. Turn the mixer off and, with a rubber spatula, gently fold in any flour that clung to the side of the bowl.
With a rubber spatula, gently fold in the pineapple. Spoon batter into prepared muffin tins. Bake at 350F for 25 minutes until puffed, nicely golden on top, and an inserted toothpick comes out perfectly clean. Move to a wire rack to cool completely.
To prepare the frosting, simply whip the frosting ingredients together until smooth and fluffy. Spread on the cooled cupcakes. If your frosting is a little thin, just put it in the fridge for a little bit to firm up before spreading onto your cakes.
To toast the coconut, put the oven broiler to high. Put the coconut on a bake sheet and put in the oven on a center rack. Remove from the oven when toasted and golden brown. Watch the coconut closely as they will burn quickly. Sprinkle the toasted coconut on the frosted cupcakes. Yield: 24 cupcakes.