mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix vue2 import
This commit is contained in:
parent
9e5bb2a580
commit
9b7016059b
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user