+ Start a Discussion
debradebra 

Open existing Lightning Web Component using Visual Studio Code app?

I am VERY new to LWC development and having issue opening a previously created LWC from my Org using Visual Studio Code.   I do not have this code yet in any folder on my system just want to connect to the org and pull down the code for pre-existing LWCs.
I did install Salesforce in Visual Studio Code but not sure how to use it once it's installed

Any tips are appreciated.  
Most of my old experience was with Apex/VF and Eclipse IDE.
Best Answer chosen by debra
GauravGargGauravGarg
Hi Debra, 

Follow the below steps:
  1. "Create a Project with Manifest" in VS code (folder to store the files) 
  2. Authorise an Org (connect the org where you already have LWC components)
  3. Go to Manifest Folder --> Right click --> Refresh component from Source using Manifest
This will refresh the VS Code and get all the existing LWC Components from the connected Org. 

If you have components in Multiple org, "Authorise an org" multiple times and refresh it.

At last, you can set Default org to deploy all the changes into one org instead of placing them in multiple org. 

Hope this helps. 

Thanks,
Gaurav
Skype: gaurav62990

All Answers

GauravGargGauravGarg
Hi Debra, 

Follow the below steps:
  1. "Create a Project with Manifest" in VS code (folder to store the files) 
  2. Authorise an Org (connect the org where you already have LWC components)
  3. Go to Manifest Folder --> Right click --> Refresh component from Source using Manifest
This will refresh the VS Code and get all the existing LWC Components from the connected Org. 

If you have components in Multiple org, "Authorise an org" multiple times and refresh it.

At last, you can set Default org to deploy all the changes into one org instead of placing them in multiple org. 

Hope this helps. 

Thanks,
Gaurav
Skype: gaurav62990
This was selected as the best answer
debradebra
Thanks Gaurav!!