wip(ssr): basic element hydration

This commit is contained in:
Evan You
2020-02-13 17:47:00 -05:00
parent 35d91f4e18
commit 6b505dcd23
11 changed files with 202 additions and 43 deletions

View File

@@ -9,13 +9,18 @@ import { patchProp } from './patchProp'
// Importing from the compiler, will be tree-shaken in prod
import { isFunction, isString, isHTMLTag, isSVGTag } from '@vue/shared'
const { render: baseRender, createApp: baseCreateApp } = createRenderer({
const {
render: baseRender,
hydrate: baseHydrate,
createApp: baseCreateApp
} = createRenderer({
patchProp,
...nodeOps
})
// use explicit type casts here to avoid import() calls in rolled-up d.ts
export const render = baseRender as RootRenderFunction<Node, Element>
export const hydrate = baseHydrate as RootRenderFunction<Node, Element>
export const createApp: CreateAppFunction<Element> = (...args) => {
const app = baseCreateApp(...args)