Preheat the oven to 200°C (180°C fan/400°F/Gas 6).
To make the filling, heat the oil in a frying pan. Add the onions and fry over a high heat for a few minutes. Cover, lower the heat, and cook for about 10 minutes until soft. Add the chestnuts, then increase the heat and fry for 2 minutes until toasted. Spoon into a bowl and leave to cool. Season with salt and freshly ground black pepper and add the cranberry sauce.
Cut the pastry into 24 x 10cm squares. Brush each square with melted butter. Put a small tablespoon of the filling into the centre of the square. Place one cube of cheese on top. Crunch the end to seal in the middle so it looks like a moneybag. Repeat with the remaining squares.
Place the canapés on a baking sheet lined with non-stick paper. Bake for about 15 minutes until golden and crisp. Serve warm.
