Software Setup (VS Code, Extensions, SFDX) – Lightning Web Components

Reading Time: 2 minutes

Software Setup (VS Code Extensions SFDX) - Lightning Web Components.jpg

Objective
Installing the Visual Studio Code
Installing the Salesforce CLI
Installing the Salesforce Extension

In this unit, we will be installing the required software/plugins to develop lightning web components.

1. Installing the Visual Studio Code
This is an IDE to develop better in salesforce. Salesforce is supporting all the new stuff for the vs code plugins(extensions).

Goto the official website of Microsoft to install the VS Code.
https://visualstudio.microsoft.com/downloads/

Here click on the Free Download button and it will ask you to save the files. Unzip the files after downloading and install the vs code.

Note: You must install the vs code v1.26 or later. If you have already installed the vs code. Please check the version of your vs code. Sometimes vs code’s standard check updates does not work. In this case, You can uninstall the older version and install it from the beginning. I faced the issues while working on this.

2. Installing the Salesforce CLI
CLI stands for Command Line Interface. Salesforce CLI provides a lot of commands to make your life easy. You can create different environments for development, testing, individual orgs fro team and merging the code in a single org using the scratch orgs and version control.

I highly recommend you to follow the steps from salesforce’s official document.
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm

You can also read the steps on trailhead as well.
https://trailhead.salesforce.com/content/learn/projects/quick-start-lightning-web-components/set-up-salesforce-dx

Now upgrade your CLI to prerelease version. Run this command in your terminal(Mac) or CMD(Windows).
sfdx plugins:install salesforcedx@pre-release

Note: This configuration is based on the current time. In future, you may not need to upgrade the CLI version with pre-release.

3. Installing the Salesforce Extension
Salesforce provides an extension package. This package contains all needed plugins. But we need to install the Lightning Web Components plugin as a separate step.

Go to View menu then click on Extensions.
1. Here search for Salesforce Extension Pack and install it. After installing Reload the visual studio.
2. Now search for Lightning Web Components and install it. After installing Reload the visual studio.

Check… Check… All Installed??

Cool, You are just a few steps away from creating your first Lightning Web Component.

Read more blogs on Lightning Web Components here

Leave a Reply