A blog about Salesforce CRM Configuration and development

Saturday, 5 October 2019

LWC Local Development Beta | Local Development Setup# and Installation


LWC ( Lightning Web Component) Local Development Beta is released by Salesforce.  This local development feature will help us to build, run and test the lightning web component on our local machine, we do not need to deploy the code on our salesforce org. Big Thanks to the LWC team.
This (Local Development) will reduce the time for LWC development and testing. This will definitely increase the productivity of the salesforce developer.


The Local Development Server is available through the Salesforce CLI plugin. It is configured and runs a Lightning Web Component enabled server on the local machine.

Setup# and Installation: 


Setup: 

Installation:
  • Open a terminal window (CMD run as administrator) run the following command to install the LWC local development server on your machine.
 sfdx plugins:install @salesforce/lwc-dev-server

  • Check for updates to the local development server.
 sfdx plugins:update





  • Open your VS Code IDE and add the.localdevserverfolder in your SFDX project to your.gitignorefile. Do not modify files inside of this folder.


  • Authorize a Developer Hub (Dev Hub) in the VS Code and through CMD.
sfdx force:auth:web:login --setdefaultdevhubusername
  • Log in using your Dev Hub credentials.



  • Start the server.
sfdx force:lightning:lwc:start

  • You can see all the LWC that you created in your org. Click on your favorite component to run.


  • c-hello-web-component: you can see this web component rendered in-browser without deploying to the org.
  • If you click on the button “View in VS Code” this will quickly open the component code in your VS Code IDE. When you can make any changes in the component code, those changes will refresh in the browser immediately.


Thanks
Arun Kumar



Share:

5 comments:

  1. It's really amazing that Salesforce has announced LWC Local Development Beta. Thanks for sharing this information, very useful. LWC Local Development will ship with the Salesforce CLI out of the box, but for now you will need to install it by running the following command: sfdx plugins:install @salesforce/lwc-dev-server. Lots of Salesforce consulting company provides the training for their customers.

    ReplyDelete

Trailhead Profile


Follow by Email

Total Pageviews

Followers

Popular Posts

Powered by Blogger.

Contact form

Name

Email *

Message *