Preheat your oven to 350°F (175°C).
Grease and line an 8-inch round cake pan or a 9x9-inch square pan with parchment paper.
In a large bowl, whisk together the flour, sugar, baking powder, baking soda, and salt.
In another bowl, mix the applesauce, coconut milk, melted coconut oil, vanilla extract, and coconut extract (if using).
Add the wet ingredients to the dry ingredients, stirring until just combined.
Fold in the shredded coconut.
Pour the batter into the prepared pan and spread it evenly.