Bring to a boil over medium heat, then turn heat down and simmer uncovered (or with the lid ajar to help prevent blueberry juice from spattering everywhere) until the blueberries and onion are softened but not mushy, about 10 minutes, stirring occasionally.
Remove from heat and cool to room temperature before serving (it will thicken as it cools).
Store refrigerated in a lidded glass jar for up to 2 weeks.