Rename Components
You can rename a component and all the files (including test files for LWC components) associated with it using the SFDX: Rename Component command. The command prevents renaming if the new component name doesn’t follow required naming conventions. For Lightning Web Components, the command automatically revises the letter case, if needed.
Renaming a component in a project doesn't delete the component from the org. To rename components in your org:
- Log in to your org and delete the component with the older name.
- Rename the components in your project.
- Deploy the components with the updated name.