This commit is contained in:
tatianamac
2019-11-26 14:50:43 -08:00
parent 8a55660ed0
commit 6d5445ecc5
13894 changed files with 2233957 additions and 0 deletions

View File

@ -0,0 +1,20 @@
const Vue = require("vue");
const renderer = require("vue-server-renderer").createRenderer({
template: `<!doctype html>
<title>{{ title }}</title>
<!--vue-ssr-outlet-->`
});
module.exports = async function(data) {
var app = new Vue({
template: "<p>Hello {{ data.name }}, this is a Vue template.</p>",
data: function() {
return { data };
}
// components: {
// 'test': ComponentA
// }
});
return renderer.renderToString(app, { title: "Test" });
};