Cut the soft tofu into bite-sized pieces.
Chop the bacon into small pieces.
Slice the onion thinly.
Heat olive oil in a pan and sauté the onion and bacon.
Add the soft tofu and stir-fry briefly.
Transfer the sautéed ingredients to a gratin dish.
Top with mozzarella cheese.
Bake in a preheated oven at 200°C for 10 minutes.