vue3-yuanma/packages/compiler-ssr/src/runtimeHelpers.ts

24 lines
916 B
TypeScript
Raw Normal View History

import { registerRuntimeHelpers } from '@vue/compiler-dom'
2020-02-04 06:47:06 +08:00
export const SSR_INTERPOLATE = Symbol(`interpolate`)
export const SSR_RENDER_COMPONENT = Symbol(`renderComponent`)
export const SSR_RENDER_SLOT = Symbol(`renderSlot`)
export const SSR_RENDER_CLASS = Symbol(`renderClass`)
export const SSR_RENDER_STYLE = Symbol(`renderStyle`)
export const SSR_RENDER_ATTRS = Symbol(`renderAttrs`)
export const SSR_RENDER_ATTR = Symbol(`renderAttr`)
2020-02-04 06:47:06 +08:00
export const SSR_RENDER_LIST = Symbol(`renderList`)
2020-02-04 06:47:06 +08:00
// Note: these are helpers imported from @vue/server-renderer
// make sure the names match!
registerRuntimeHelpers({
2020-02-04 06:47:06 +08:00
[SSR_INTERPOLATE]: `_interpolate`,
[SSR_RENDER_COMPONENT]: `_renderComponent`,
[SSR_RENDER_SLOT]: `_renderSlot`,
[SSR_RENDER_CLASS]: `_renderClass`,
[SSR_RENDER_STYLE]: `_renderStyle`,
[SSR_RENDER_ATTRS]: `renderAttrs`,
[SSR_RENDER_ATTR]: `renderAttr`,
2020-02-04 06:47:06 +08:00
[SSR_RENDER_LIST]: `_renderList`
})