|
|
há 6 anos atrás | |
|---|---|---|
| .. | ||
| __tests__ | e495fa4a18 feat(ssr): render portals (#714) | há 6 anos atrás |
| src | fd031490fb feat(ssr): useSSRContext | há 6 anos atrás |
| LICENSE | 34989ef7fe chore: license | há 6 anos atrás |
| README.md | 8f463b3859 chore: readme | há 6 anos atrás |
| api-extractor.json | b2d269a651 build: use api-extractor for type rollup | há 6 anos atrás |
| index.js | e05673f4d3 refactor: rename packages | há 7 anos atrás |
| package.json | 478b4cfb2c release: v3.0.0-alpha.5 | há 6 anos atrás |
const { createSSRApp } = require('vue')
const { renderToString } = require('@vue/server-renderer')
const app = createSSRApp({
data: () => ({ msg: 'hello' }),
template: `<div>{{ msg }}</div>`
})
;(async () => {
const html = await renderToString(app)
console.log(html)
})()