Finely slice 3.5 pounds of onions and add them to a large pot with a large glug of oil (olive or vegetable).
Cook the onions on a low heat for about an hour, allowing them to break down and reduce in size.
Once reduced, add 1 tablespoon of chili flakes, black pepper, and garlic granules. Stir in a large knob of butter.
Continue to slowly cook the onions, stirring occasionally, until they turn a nice golden brown, which will take another hour.
Once the onions are golden brown, add 12 ounces of granulated sugar and stir until melted. The mixture will start to thicken.
Add a freshly chopped chili, seeds and all, and turn up the heat. Stir as little as possible to allow the onions to caramelize.
Add a good glug of white wine and let it bubble to burn off the alcohol.
To test if the jam is ready, place a teaspoon of the mixture on a cold surface. If it thickens, it's ready to be jarred.
