Create LWC via Command Palette vs via Terminal in visual studio #inSalesforce
Create LWC via Command Palette in visual studio #inSalesforce
- Open Visual Studio and wait some time for the extensions to get loaded
- Press Ctrl+Shift+P for the command palette to open
- Start typing SFDX, select SFDX: Create Lightning Web Component
- Press Enter to accept the default force-app/main/default/lwc.
- Enter your desired name as the name of the new component.
- Press Enter.
- View the newly created files in Visual Studio Code.
Create LWC via Terminal in visual studio #inSalesforce
- Here LWC directory is required
- In <app dir>/main/default, create the lwc directory.
- Switch to the lwc directory (suppose here \force-app\main\default\lwc , start with cd force-app and so on...) and create the Lightning web component
- Use sfdx force:lightning:component:create --type lwc -n theComponentName
Comments
Post a Comment