Cook bacon until crispy. Transfer bacon to a paper towel-lined plate, reserving about a tablespoon of bacon fat in the pan
Reduce heat to medium-low. Add onion and shallots to the pan and cook, stirring often, until the onions are caramelized, about 15 minutes
Stir in garlic, brown sugar, maple syrup, vinegar, chili powder and cooked bacon. Bring mixture to a simmer then reduce heat to low. Cook until the liquid has reduced and the onions have thickened, 7 to 10 minutes
Let cool before transferring to a jar. Can be served cold or warm.