const Vue = require("vue"); const renderer = require("vue-server-renderer").createRenderer(); module.exports = async function(templateData) { var app = new Vue({ template: "
Hello {{ data.name }}, this is a Vue template.
", data: { data: templateData } // components: { // 'test': ComponentA // } }); return renderer.renderToString(app); };