Heat the oil in a medium saucepan over medium-low heat. Add the onion and cook, stirring often, for 5 minutes or until soft. Add the garlic and chilli, and cook, stirring, for 2 minutes or until aromatic.
Add the tomato to the onion mixture and cook, stirring occasionally, for 5 minutes or until the tomato breaks down.
Add the sugar and vinegar, and cook for 10 minutes or until the mixture thickens. Set aside to cool.