Nanobots Producing Megastructures
Wondering what’s next for npm?Check out our public roadmap! »

@vue/server-rendererTypeScript icon, indicating that this package has built-in type declarations

3.0.5 • Public • Published

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

Keywords

Install

npm i @vue/server-renderer

DownloadsWeekly Downloads

2,627

Version

3.0.5

License

MIT

Unpacked Size

57.6 kB

Total Files

9

Last publish

Collaborators

  • avatar