How to make it
Melt the butter in a large, deep frying pan and sweat the onions with the thyme and salt over a low to medium heat for 20 to 30 minutes until they are soft and lightly coloured. Tip into a colander and leave to drain and cool. Season with pepper.
Line a baking tray with non-stick baking parchment. Roll out the pastry on a floured surface until 3mm thick. Cut out a 30 x 23 cm rectangle. Place it on the parchment-lined tray and prick all over with a fork. Spread the cooled onions evenly over the pastry rectangle, leaving a 2 cm border clear. Fold the border in to make a double-thickness “frame” all around, pressing to seal. Refrigerate for 30 mins.
Heat the oven to 180 degrees C fan (200 degrees C/ gas 6).
Bake the tart for 20 to 25 minutes until the pastry is golden. Crumble the cheese in top, then bake for a further 3 minutes, until the cheese has just started to melt. Serve hot or at room temperature.