"This is a dish easily available in Indonesia. Different states have different ways of cooking the chile topping - some use tomatoes, some use tamarind. There are no hard and fast rules in making this simple yet tasty vegetable dish."
Place chile peppers, onion, tomato, and garlic in a food processor. Pulse briefly until coarsely chopped.
Heat 2 tablespoons oil in a large skillet over low heat until shimmering. Arrange half the eggplant in a single layer and pan-fry until slightly browned and soft, 2 to 3 minutes per side. Transfer to a serving dish. Repeat with 2 tablespoons oil and remaining eggplant.
Heat remaining 1 tablespoon oil in the same skillet. Add chile mixture; cook and stir until softened, about 1 minute. Stir in sugar and salt. Spoon chile mixture over eggplant.