LWC | Configure Your Development Environment

We will use Salesforce DX tools and a VS Code editor to create the Lightning web component, it cannot be created from the developer console.

The Salesforce CLI is a powerful command-line interface for working with your Salesforce org that simplifies development and build automation. It can be used to:

  • Aggregate all the tools you need to develop with and perform commands against your Salesforce org
  • Synchronize source to and from scratch orgs
  • Create and manage orgs
  • Import and export data
  • Create and execute tests
  • Create and install packages

Let’s install the Salesforce CLI first before we install the code editor or IDE:

Download Salesforce CLI

Download and install Salesforce CLI according to your system requirements.

After installation, run the sfdx command in your system’s command-line interface (CMD) to see if CLI was properly installed.

To develop Lightning web components, you can use your favorite code editor.

Salesforce recommends Visual Studio Code because its Salesforce Extension Pack includes powerful features for working with the Salesforce CLI, the Lightning Component framework, Apex, and Visualforce.

Download VS CODE editor

Download and install VS Code editor on your system.

After installation, launch VS Code and select the extension icon from the left panel. Search for the ‘salesforce extension pack’ and click on it and Install it.

Now restart your VS Code editor.

Congratulations 🎉 you have successfully configured your development environment and you are now ready to create your first lightning web component.

Join 1,564 other followers