Place the butter into a medium pan (saucepan or frypan is fine - I like to use a frying pan). Add the apple, vanilla, brown sugar, cinnamon and salt, and cook over medium heat, stirring frequently, until the butter and sugar has melted. Continue to cook for 3-4 minutes until the apple has softened slightly.
Combine the sugar and flour in a small bowl. Add to the apple mixture and cook, stirring constantly, until the mixture has thickened up, a few minutes.
Transfer to a sheet pan and leave to cool uncovered at room temperature. If you are leaving it for a while, place a piece of plastic wrap directly against the surface to stop a skin forming (once the filling has cooled slightly).
To store, transfer once cooled to an airtight container or ziploc bag. Store in the fridge for up to 3 days, and freeze for up to 3 months. Defrost overnight in the fridge before using.
