Heat the blueberries in a saucepan over medium heat for about 9 minutes, crushing slightly with a wooden spoon and stirring occaisionally until softened and juicy.
Whisk the dry ingredients, except the lemon zest and vanilla, together in a small bowl.
Mix your dry ingredients into the saucepan and cook for 2-3 minutes, stirring constantly, until the mixture thickens.
Remove from the heat and stir in the vanilla and zest.
Pour into a prepared pie tin. Cut strips of pie dough and create a lattice on top.
Beat the egg and milk together, then brush the pastry with egg wash and sprinkle with demerara sugar.
Bake at 400 degrees for 30-40 minutes, or until pastry is golden brown.