Thinly slice the onion.
Heat the oil in a frying pan and gently sauté the onion until soft. Add the sugar, thyme and balsamic vinegar and cook until caramelised.
Meanwhile, cut the chestnuts in half, then add to the onion mixture and combine. Let it cool.
Unroll the pastry and using a large cup stamp out 8-10 circles. Put another, smaller mug in the middle of the pastry circles, and gently push it down to create a border. Place them onto a baking sheet.
Divide the onion and chestnut mixture equally between the tarts, spreading out evenly within the middle circle.
Rest the tray in the fridge until you’re ready to cook.
Heat the oven to 200°C. Put the baking tray into the heated oven and cook the tartlets for 10-15 minutes, until the rim rises and is golden brown.
Serve with feta or goat cheese crumbled on the top.