@lwc/engine-server

Renders LWC components in a server environment.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@lwc/engine-server
1,2953092.23.6a day ago2 years agoMinified + gzip package size for @lwc/engine-server in KB

Readme

@lwc/engine-server
WARNING: This is an experimental package. It is subject to change, may be removed at any time, and should be used at your own risk!
This package can be used to render LWC components as strings in a server environment.

Supported APIs

This package supports the following APIs.

renderComponent()

This function renders a string-representation of a serialized component tree, given a tag name and an LWC constructor. The output format itself is aligned with the current leading proposalexplainer, but is subject to change.
import { renderComponent } from 'lwc';
import LightningHello from 'lightning/hello';

const componentProps = {};
const serialized = renderComponent('lightning-hello', LightningHello, componentProps);