fix vue2 import

This commit is contained in:
Pooya Parsa 2020-11-02 01:54:31 +01:00
parent 9e5bb2a580
commit 9b7016059b

View File

@ -1,8 +1,10 @@
import _renderToString from 'vue-server-renderer/basic.js'
import { createRenderer } from 'vue-server-renderer/build.prod.js'
const _renderer = createRenderer({})
export function renderToString (component, context) {
return new Promise((resolve, reject) => {
_renderToString(component, context, (err, result) => {
_renderer.renderToString(component, context, (err, result) => {
if (err) {
return reject(err)
}