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:

  1. Log in to your org and delete the component with the older name.
  2. Rename the components in your project.
  3. Deploy the components with the updated name.