Compile react templates for server side rendering