Caramelize the onions. Place sliced onions in a 6-quart slow cooker. Stir in the melted butter, sugar, salt, and pepper. Top with thyme sprigs and bay leaf. Place the lid on the pot and cook on LOW for 8 hours, or until the onions are deeply browned and caramelized. Stir halfway through.
Make it soupy. Once onions are caramelized, stir in the beef broth and white wine. Taste for salt and pepper and season accordingly.
Cook. Cover and cook on LOW for an additional 4 hours or on HIGH for 2 hours, until heated through.
Ladle into bowls. Remove the lid and discard the thyme sprigs and bay leaf. Ladle the soup into ovenproof bowls and transfer the bowls to a large baking sheet.
Add toppings. Top each bowl of soup with a slice of French bread (if using) and shredded Gruyere cheese (if using).
Melt the cheese. Turn the oven broiler to High. Broil the soups in the oven until the cheese is melted and bubbly, about 2 to 3 minutes. Watch carefully to prevent burning.
Serve. Carefully remove from oven and enjoy immediately.
Notes
For an even richer flavor, you can use a combination of beef broth and chicken broth. If you don't have dry white wine, you can substitute it with a little more beef broth.