Use a tofu press to get rid of excess liquid. This is a very important step if you want crispy tofu. Press for as long as you have time for but I find that 15 minutes is usually just enough.
Chop the pressed tofu into bite sized cubes and put in a bowl along with the cornflour and toss to coat the tofu completely
Add a spray of olive oil (if using) to a hot frying pan or skillet and fry the tofu on a medium to high heat until crispy and cooked through, usually around 8-10 minutes
While this is cooking you can prepare the vegetables, chop the the onion into large chunks, thinly slice the carrots into inch long pieces and chop the pineapple into bite sized chunks
When the tofu is finished cooking transfer to a bowl and set aside
Re spray the pan and cook the vegetables on a medium to high heat until starting to soften and become slightly charred, usually around 10 minutes
Meanwhile start the sauce, add all of the ingredients to a sauce pan and cook through
When the vegetables are cooked, add the tofu back in to the pan to warm through and add the sauce, mix well
Serve immediately over your favourite rice or noodles