[Beta] Preview LWC components in isolation.
Component preview launches an isolated development environment for Lightning Web Components, enabling rapid iteration without needing to deploy changes. The server provides real-time previews of your components through hot module replacement (HMR), automatically refreshing the view when source files are modified.
When running the development server, these changes are immediately reflected:
- Component template (HTML) modifications
- Styling updates in component CSS files
- JavaScript logic changes that don't modify the component's API
- Adding or updating internal component dependencies
- Modifying static resources used by the component
See the LWC Development Guide for more information about component development best practices and limitations.
Name of a component to preview.
Launch component preview without selecting a component
Open the component preview in performance mode
Unable to find components
Unable to determine component name
Failed to parse component metadata at: %s
Unable to find component with name: %s
Cannot use --performance flag when --client-select is enabled
- Select a component and launch the component preview: <%= config.bin %> <%= command.id %>
- Launch component preview for "myComponent": <%= config.bin %> <%= command.id %> --name myComponent
- Launch component preview for "myComponent" in performance mode: <%= config.bin %> <%= command.id %> --name myComponent --performance