Before creating the Lightning Web Component, we need to set up the salesforce DX project. In the previous article, we already have covered the prerequisite for creating the DX project.
Ctrl+Shift+P
on Windows or Cmd+Shift+P
on macOS.SFDX
and Select SFDX: Create Project.
HelloWorld
as the project name and press Enter.
Create Project.
You will see something like this as your base setup.Till now, we have set up the DX project for our machine now. We have to connect this with our salesforce org. Follow the following steps to authorize your org
Ctrl+Shift+P
on Windows or Cmd+Shift+P
on macOS.SFDX
and Select SFDX: Authorize an Org.
Enter
to accept the Project Default Use login URL
option.Enter
to accept the default alias. It will open a window to Log in using your Salesforce credentials.