I make/deploy my APEX and LWC components through VS Code and SFDX and recently ran into a problem where, when I went to deploy a lwc to another sandcopy, I noticed that the folder/file structure I had created in VS code was completely gone in the new sandbox. Hindsight I can now see (I assume) that salesforce don't deploy the file structure from VS Code to SF.
My structure looks like this:
main
-- default
---- lwc
------ <My Lightning Web Component>
--------- A subcomponent used in <My Lightning Web Component>
--------- Another component used in <My Lightning Web Component>
But when i deploy them to another org using an outbound changeset, it looks like this:
main
-- default
---- lwc
---- <My Lightning Web Component>
---- A subcomponent used in <My Lightning Web Component>
---- Another component used in <My Lightning Web Component>
My question is: How do I maintain the initial structure when deploying to another org. As projects grow in size, this is of course vital, and I realise that there has to be a solution for this - I just haven't been able to find anything myself
Thanks, Joe