Preheat your oven to 350°F (175°C). Line a cupcake tin with liners.
In a large mixing bowl, cream together the softened butter and granulated sugar until light and fluffy.
Add the eggs one at a time, mixing well after each addition.
Mix in coconut milk, dark rum, and vanilla extract until well combined.
In another bowl, combine the flour, baking powder, baking soda, salt, and shredded coconut.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined.
Divide the batter evenly among the cupcake liners, filling each about ⅔ full.
Bake in the preheated oven for 18-20 minutes, or until a toothpick inserted into the center comes out clean.
While the cupcakes are baking, prepare the frosting. In a medium bowl, beat together the softened cream cheese and butter until creamy.
Gradually add the powdered sugar, mixing until smooth. Stir in the vanilla extract and crushed pineapple until combined.
Once the cupcakes have cooled completely, pipe or spread the pineapple cream cheese frosting onto each cupcake.
If desired, sprinkle additional shredded coconut on top for garnish.