I haven't found a way to generate previews reliably during build, but this is the first step towards that