wip(ssr): basic components
This commit is contained in:
@@ -19,6 +19,13 @@ import { warn } from './warning'
|
||||
// resolveComponent, resolveDirective) during render
|
||||
export let currentRenderingInstance: ComponentInternalInstance | null = null
|
||||
|
||||
// exposed for server-renderer only
|
||||
export function setCurrentRenderingInstance(
|
||||
instance: ComponentInternalInstance | null
|
||||
) {
|
||||
currentRenderingInstance = instance
|
||||
}
|
||||
|
||||
// dev only flag to track whether $attrs was used during render.
|
||||
// If $attrs was used during render then the warning for failed attrs
|
||||
// fallthrough can be suppressed.
|
||||
|
||||
@@ -101,7 +101,10 @@ export { registerRuntimeCompiler } from './component'
|
||||
|
||||
// SSR -------------------------------------------------------------------------
|
||||
import { createComponentInstance, setupComponent } from './component'
|
||||
import { renderComponentRoot } from './componentRenderUtils'
|
||||
import {
|
||||
renderComponentRoot,
|
||||
setCurrentRenderingInstance
|
||||
} from './componentRenderUtils'
|
||||
import { isVNode, normalizeVNode } from './vnode'
|
||||
|
||||
// SSR utils are only exposed in cjs builds.
|
||||
@@ -109,6 +112,7 @@ const _ssrUtils = {
|
||||
createComponentInstance,
|
||||
setupComponent,
|
||||
renderComponentRoot,
|
||||
setCurrentRenderingInstance,
|
||||
isVNode,
|
||||
normalizeVNode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user