In a pan, heat 2 teaspoon butter and then, add pineapple puree, brown sugar and star anise.
We need to caramelize the pineapple. So, keep cooking in low heat until you see that it becomes light brown in color.
Then, remove star anise from the pan, keep it aside and let it cool.
In a bowl, mix the rest of the ingredients - egg, flour, ginger, vanilla extract, butter, milk, cinnamon and baking powder (Mix the dry ingredients first and then, mix the wet ingredients to the dry ones).
Add caramelized pineapple to the bowl and keep whisking until the batter looks smooth with no lumps.
Grease the baking pan and dust it with some flour.
Pour the batter and bake it at 375 F for about 50 minutes. It should feel set when you press in the center.