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

    3.1.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

    23,518

    Version

    3.1.5

    License

    MIT

    Unpacked Size

    63.1 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar