Preheat the oven to 350°F. Grease a 9×5-inch loaf pan and line it with parchment paper.
In a medium bowl, whisk together the flour, baking soda, baking powder, salt, and cinnamon. Set aside.
In a large bowl, whisk together the melted butter, brown sugar, and granulated sugar.
Add the eggs one at a time, whisking after each addition. Stir in the vanilla extract.
Add the mashed bananas and drained crushed pineapple. Stir until combined.
Add the dry ingredients to the wet ingredients. Fold gently with a spatula just until no dry streaks of flour remain.
Fold in the shredded coconut and chopped nuts, if using.
Transfer the batter to the prepared loaf pan and smooth the top. Sprinkle with the additional shredded coconut, if desired.
Bake for 60 to 70 minutes, or until a toothpick inserted in the center comes out clean or with a few moist crumbs.
If the bread is browning too quickly, loosely cover the top with aluminum foil during the final 15 to 20 minutes of baking.
Cool the bread in the pan for 15 minutes.
Lift the loaf from the pan and place it on a wire rack. Allow it to cool completely before slicing.