Peel and cut the pineapple into cubes.
Place the cubes in a food processor. Add water and process the pineapple into a smooth paste.
Transfer into a medium-sized pot.
Add lemon juice, followed by sugar.
Cook the filling over low heat, stirring constantly.
Once it has thickened slightly, add the cornstarch (mixed with water). Mix well.
Continue to cook until the filling thickens further.
Remove from heat and let it cool completely before using.
Keep the filling refrigerated if not used.