vue3-yuanma/packages/server-renderer
2020-03-06 14:52:15 -05:00
..
__tests__ refactor(fragments): remove visible anchors for fragments 2020-02-26 16:32:06 -05:00
src fix(ssr): fix ssr on-the-fly compilation + slot fallback branch helper injection 2020-03-06 14:52:15 -05:00
api-extractor.json build: use api-extractor for type rollup 2019-09-03 12:16:22 -04:00
index.js refactor: rename packages 2018-10-26 15:44:50 -04:00
LICENSE chore: license 2019-10-28 11:15:17 -04:00
package.json build: make @vue/shared public 2020-02-29 22:04:42 -05:00
README.md chore: readme 2020-02-18 14:56:53 -05:00

@vue/server-renderer

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)
})()