Preheat the oven to 350°F (175°C) and prepare cake pans.
In a large mixing bowl, whisk together flour, sugar, baking powder, baking soda, and salt.
In another bowl, combine coconut milk, oil, vanilla extract, and eggs. Mix until well combined.
Pour the wet ingredients into the dry ingredients and stir until just combined. Fold in crushed pineapple and shredded coconut.
Divide the batter evenly between the prepared cake pans and smooth the tops.
Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted in the center comes out clean.
Remove from oven and let the cakes cool in the pans for 10 minutes before transferring to wire racks.
Once completely cool, prepare the frosting by whipping the heavy cream, powdered sugar, and coconut extract until stiff peaks form.
Place one cake layer on a serving plate, spread frosting evenly on top, then place the second layer on top and frost the entire cake.
Garnish with additional shredded coconut and fresh pineapple slices if desired, then slice and serve.