Precompile JavaScript templates for using on front-end