Kishore I am a Salesforce developer and a so-called blogger at I love learning and sharing.

Set up your Dev Environment for Building Salesforce Lightning Web Components

Set up your Dev Environment for Building Salesforce Lightning Web Components

You can’t develop Lightning web components in the Developer Console. So, to develop Lightning web components, we have to use any code editor. I use VS Code. To deploy and retrieve source code from your Org you need to use Salesforce CLI.

Install Salesforce CLI

The Salesforce CLI is a powerful command line interface that simplifies development and build automation when working with your Salesforce org.

Install CLI from here: Salesforce CLI

After Installing CLI,

In Windows, To upgrade to the current version open command prompt and run the following code.

sfdx update

Find more sfdx commands here: sfdx commands

Install VS Code:

I use VS code, you can use code editor of your choice. Install VS code from here: VS Code

Download Salesforce Extension Pack from VS Code extensions section or download it directly from VS Code market place Salesforce Extension Pack

Congrats! now that you have set up Salesforce CLI and Code Editor successfully. Let’s go ahead and setup your Dev Org to start coding.

Final Touch ups

In your VS code, create a project,

  • To create a project, In VS Code press ctrl + Shift + P which open command palette.
  • Type sfdx: Create project with manifest and press enter.
  • Give a project Name and press Enter.

Set up default Org:

In Command palette,

  • Type sfdx: set a default org and press enter
  • Select sfdx: Authorize an org and press enter
  • Select sandbox or production accordingly and press enter
  • Enter Org Alias (short name) and press enter
  • Salesforce login page is opened in the browser tab, Enter your salesforce credentials and that’s it it’s done.

Now you are just one step away from creating Lightning Web Component.

Also Read:

Create your First Lightning Web Component Data Binding in LWC

If you enjoyed this blog post, share it with your group!

Do subscribe, for getting latest updates directly in your inbox.