Preheat the oven to 350 degrees. Melt butter (stovetop or microwave) and set aside. Lightly brush melted butter into your madeleine pan covering all the parts of the shell, and flour the madeleine pans covering all the shells, and tap the excess flour out of the pan. Note: When you reuse your pan for more batches, you will want to wash, dry, and rebutter/flour your pan or the madeleines will stick.
Finely chop both the pineapple and coconut, set aside.
In the bowl of an electric mixer fitted with the paddle attachment, beat the eggs, sugar, and vanilla on medium speed for 8-9 minutes. After beating, the eggs and sugar will be pale and fluffy-smooth. Watch for the "ribbon" stage. When the beater is raised, a thick ribbon will slowly fall back into the bowl.
Next, add ½ cup melted and cooled butter and blend in for 1 minute, turn off mixer and put away. We will do the rest by hand!
Sift together the flour, cornstarch, baking powder, and salt, and gently fold ½ at a time into the batter with a rubber spatula. (see notes on folding technique).
Stir in the finely chopped pineapple and coconut.
The batter will be thick and sticky. Fill each shell ¾ full with batter using a small 1" ice cream scoop or a generous tablespoon. Don't spread the batter, just place it into the pan.
Bake on center rack for 10 minutes. This can vary according to the oven itself and pan you use.
Madeleines are done when they puff up, spring back when pressed slightly, with slightly golden brown edges. They will have a visible bump on top, that means they are baked correctly!
Tap the madeleines out on a baking rack or piece of parchment paper and allow to cool.