const Vue = require("vue"); const renderer = require("vue-server-renderer").createRenderer({ template: ` {{ title }} ` }); module.exports = async function(data) { var app = new Vue({ template: "

Hello {{ data.name }}, this is a Vue template.

", data: function() { return { data }; } // components: { // 'test': ComponentA // } }); return renderer.renderToString(app, { title: "Test" }); };