Sauté the onions with the butter and sugar over low heat for about 10 minutes until golden and caramelized.
When the onions are done, remove the skillet from the heat.
Preheat your oven to 400 degrees while you prepare the bundles.
Get out the package of puff pastry dough that is thawed but still cool. Take out a sheet and cut it in 9 squares with a knife, like a tic-tac-toe board.
Get out your Gruyere cheese. You can shred it if you like, but I just quickly cut it into some little pieces.
Place about a tablespoon of caramelized onions in the center of a dough square, top with a little bit of the cheese.
Pull up the corners and pinch them together into a little bundle.
Place the bundles in the cups of a mini muffin pan.
Repeat the process with the other sheet of dough, making 18 little bundles.