Choose a microwave-safe mug (do not fill more than halfway so the batter can rise).
Add 4 tablespoons all-purpose flour, 2 tablespoons granulated sugar, and 1/2 teaspoon baking powder to the mug. Stir well to evenly combine the dry ingredients.
Pour in 4 1/2 tablespoons nondairy milk, 1 1/2 tablespoons oil, and 3/4 teaspoon vanilla extract. Stir until the batter is smooth and free of large lumps.
If using, fold in vegan chocolate chips or sprinkles until evenly distributed.
Microwave the mug on high for 1 1/2 to 2 minutes. Check doneness—the top should be set and spring back slightly; if it is still wet in the center, continue cooking in 10-second bursts until cooked through.
Let the mug cake cool in the mug for about 1 minute (the mug will be hot).
Serve directly from the mug and top with vegan whipped topping or vegan ice cream if desired.