For the sauce:
1/3 cup water
2 tablespoons regular or vegetarian oyster sauce
2 tablespoons Shaoxing wine or dry sherry
1 tablespoon soy sauce or tamari
1 teaspoon cornstarch
1 teaspoon rice vinegar
1/4 teaspoon red pepper flakes
For the stir-fry:
1 (14- to-16-ounce) package firm tofu, drained and cut into 3/4-inch cubes
4 tablespoons vegetable oil
Salt
1 pound eggplant, preferably Asian, cut into 3/4-inch dice
2 cloves garlic, finely chopped
1/2 cup packed fresh Thai or Italian basil leaves
Steamed rice, for serving
For the sauce: Whisk all the ingredients together in a small bowl, making sure the cornstarch is dissolved.
For the stir-fry: Line a large plate with two layers of paper towels. Place the tofu in a single layer on the paper towels to drain.
Heat 2 tablespoons of the oil in a 14-inch flat-bottomed wok or large nonstick frying pan over medium-high heat until shimmering. Add the tofu, spread into a single layer, and season generously with salt. Cook, flipping rarely, until golden-brown on at least 2 sides (be careful, it will splatter), about 10 minutes total. Remove to a clean plate.
Add the remaining 2 tablespoons of oil to the pan and add the eggplant. Season with salt and stir-fry until charred in spots, about 2 minutes. Add the garlic and cook until fragrant, about 30 seconds.
Add the reserved tofu and stir to combine. Whisk the reserved sauce to recombine and dissolve the cornstarch, and add it to the pan. Reduce the heat to medium and stir-fry until the sauce has thickened and coats the tofu and eggplant, about 1 minute more. Remove the pan from the heat, add the basil leaves, and toss to combine. Serve immediately with steamed rice.