Vue.js server-side rendering compiler that transforms Vue templates into optimized render functions for server-side execution
—
SSR-specific handling for Vue's built-in components including Teleport, Suspense, Transition, and TransitionGroup during server-side rendering.
Handles Vue teleport component during SSR transformation, managing teleport target handling and content rendering.
/**
* Process teleport nodes during SSR transformation
* @param node - Teleport node to process
* @param context - SSR transform context
*/
function ssrProcessTeleport(
node: TeleportNode,
context: SSRTransformContext
): void;Key Features:
Usage Notes:
X_SSR_NO_TELEPORT_TARGET errorHandles Vue suspense component during SSR transformation, managing async component rendering and fallback content.
/**
* Process suspense nodes during SSR transformation
* @param node - Suspense node to process
* @param context - SSR transform context
*/
function ssrProcessSuspense(
node: SuspenseNode,
context: SSRTransformContext
): void;
/**
* Transform suspense nodes for SSR rendering
* @param node - Component node representing suspense
* @param context - Transform context
*/
function ssrTransformSuspense(
node: ComponentNode,
context: TransformContext
): void;Key Features:
Usage Notes:
Handles Vue transition and transition-group components during SSR transformation.
/**
* Transform transition nodes for SSR rendering
* @param node - Component node representing transition
* @param context - Transform context
*/
function ssrTransformTransition(
node: ComponentNode,
context: TransformContext
): void;
/**
* Transform transition-group nodes for SSR rendering
* @param node - Component node representing transition-group
* @param context - Transform context
*/
function ssrTransformTransitionGroup(
node: ComponentNode,
context: TransformContext
): void;Key Features:
Usage Notes:
interface TeleportNode {
type: NodeTypes.ELEMENT;
tagType: ElementTypes.COMPONENT;
tag: 'Teleport' | 'teleport';
props: (AttributeNode | DirectiveNode)[];
children: TemplateChildNode[];
loc: SourceLocation;
}
interface SuspenseNode {
type: NodeTypes.ELEMENT;
tagType: ElementTypes.COMPONENT;
tag: 'Suspense' | 'suspense';
props: (AttributeNode | DirectiveNode)[];
children: TemplateChildNode[];
loc: SourceLocation;
}
interface TransitionNode {
type: NodeTypes.ELEMENT;
tagType: ElementTypes.COMPONENT;
tag: 'Transition' | 'transition' | 'TransitionGroup' | 'transition-group';
props: (AttributeNode | DirectiveNode)[];
children: TemplateChildNode[];
loc: SourceLocation;
}Built-in component processing includes specific error handling for common issues:
X_SSR_NO_TELEPORT_TARGET error when teleport lacks 'to' propX_SSR_INVALID_AST_NODE error for malformed built-in components// Template with teleport
const template = `
<div>
<Teleport to="#modal">
<div class="modal">Modal content</div>
</Teleport>
</div>
`;
// Compilation handles teleport processing
const result = compile(template);
// Generates code that renders teleport content inline during SSR// Template with suspense
const template = `
<Suspense>
<template #default>
<AsyncComponent />
</template>
<template #fallback>
<div>Loading...</div>
</template>
</Suspense>
`;
// Compilation processes suspense boundaries
const result = compile(template);
// Generates code that handles async components during SSR// Template with transitions
const template = `
<TransitionGroup name="list" tag="ul">
<li v-for="item in items" :key="item.id">
{{ item.name }}
</li>
</TransitionGroup>
`;
// Compilation preserves structure for SSR
const result = compile(template);
// Generates code that renders list without transition effectsInstall with Tessl CLI
npx tessl i tessl/npm-vue--compiler-ssr