Sometimes we may have to work on the LWC which was deployed by some other. In such cases, we may not have the code on our local machine.
To pull the component's code from the org, we can use the below command
sfdx force:source:retrieve -m LightningComponentBundle:[cmpName]
Note :
- Make sure Salesforce CLI is installed on your machine.
- Make sure after creating the project (
SFDX: Create Project
), authorize the Salesforce Org. To authorize, runSFDX: Authorize an Org
command in the VSCode terminal.
Top comments (0)