Whisk cornstarch, sugar, and one cup of coconut milk. Set aside.
Heat remaining coconut milk on the stovetop in a saucepan until bubbling.
While whisking the boiling coconut milk, slowly pour in the cornstarch mixture.
Continuously whisking, bring the mixture back up to a simmer. Continue whisking for another minute to let the mixture thicken but do not bring to a full boil.
Take coconut mixture off the heat. Whisk in the coconut extract, if using. Pour haupia mixture into a nonstick or greased 8x8" pan.
Cover with plastic wrap pressed directly onto the surface of the haupia mixture. This prevents it from developing a dried out skin on the surface.
Let set in the fridge for four hours or overnight. When set, cut into rectangles, and it's ready to serve!