wip(ssr): initial scaffold for compiler-ssr

This commit is contained in:
Evan You
2020-02-02 00:05:27 -05:00
parent 34e61197c7
commit efbbd19b3d
26 changed files with 496 additions and 36 deletions

View File

@@ -0,0 +1,15 @@
import { NodeTransform, NodeTypes, ElementTypes } from '@vue/compiler-dom'
export const ssrTransformComponent: NodeTransform = (node, context) => {
if (
node.type === NodeTypes.ELEMENT &&
node.tagType === ElementTypes.COMPONENT
) {
return function ssrPostTransformComponent() {
// generate a _push(_renderComponent) call
// dynamic component as well
// !check if we need to bail out for slots
// TODO also handle scopeID here
}
}
}