JSPM

@vue/server-renderer

3.0.0-beta.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4676486
  • Score
    100M100P100Q272176F
  • License MIT

@vue/server-renderer

Package Exports

  • @vue/server-renderer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vue/server-renderer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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