Preheat the oven to 400°F (200°C).
Slice the pineapple into 1-inch thick rounds and then cut each round into bite-sized pieces.
In a small bowl, mix together the brown sugar, chili powder, and cayenne pepper (if using).
Wrap each pineapple bite with a slice of bacon and secure with a toothpick.
Place the bacon-wrapped pineapple bites on a baking sheet lined with parchment paper.
Sprinkle the brown sugar mixture over the bacon-wrapped pineapple bites, making sure to coat them evenly.
Bake in the preheated oven for 20 minutes, or until the bacon is crispy and the pineapple is tender.
Remove from the oven and let cool slightly before serving.