Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 427 Bytes

SSR.md

File metadata and controls

23 lines (18 loc) · 427 Bytes

SSR example.

entry.server.js is the same as entry.client.js

// main.js
import Vue from 'vue'

// Not required tho.
const options = {}

const renderer = new Renderer({
  ...options,
  // SSR status to `true`.
  ssr: true
})

// if Options API.
Vue.mixin(renderer.mixin)
// For Vue 3:
// createApp(App).mixin(stylesRenderer.mixin).mount('#app')

Then just put renderer.style into your template.