Newer Version Available

This content describes an older version of this product. View Latest

Create Lightning Web Components

To create a Lightning web component from the CLI, you must have an lwc directory in your Salesforce DX project.
  1. In <app dir>/main/default, create the lwc directory.
  2. Change to the lwc directory.
  3. In the lwc directory, create the Lightning web component.
    1sfdx force:lightning:component:create --type lwc -n myLightningWebComponent