Melt 40 g (3 Tbs) of the butter in a large skillet over medium heat until foamy. Add onions and fry, stirring occasionally, until golden, about 20 minutes. Add 150 g (2/3 cup) wine and herbs, and simmer for 5 minutes. Remove from heat and set aside.
In a large saucepan, melt butter in the flour over medium heat, stirring continuously, until it bubbles. Continue to cook and stir flour and butter for 2 minutes to make a light-colored roux.
Add stock to the roux, whisking if necessary to avoid lumps. Bring to a boil, then reduce heat and simmer for 15 minutes.
Add onion mixture to stock and simmer an additional 15 minutes, skimming as needed. Remove herbs, season with salt and pepper to taste, and keep hot.
Preheat oven to 400°F.
Toast baguette slices and set aside.
Divide the wine among oven-proof bowls, ladle in the soup, and spoon cream on top. Top soup with toasted baguette and sprinkle with grated cheese.
Bake until cheese is melted.
Serve immediately.