How to delete LWC component

10

LWC components can be deleted in two ways.

1. Delete from sfdx

If you want to delete a component “accountCreator” then run below command

sfdxforce:source:delete -m LightningComponentBundle:accountCreator -u username@company.com


2. Delete from the Developer console

  • Run below Tooling API query in the Developer console. (make sure to select “use Tooling API” at the bottom)

SELECT Id,apiversion, developerName, FullName, targetConfigs FROM LightningComponentBundle

  • Select the component from results and click “Delete Row”.

Share on

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Related Posts

LWC vs Aura

LWC LWC uses core Web Components standards (Native browser APIs) and provides only what’s necessary to perform well in browsers supported by Salesforce. Because it’s

Marketing Cloud Basics

It enables you to know your customer, personalize with intelligence, and engage across the entire journey. It’s the only integrated customer engagement platform that enables

SFDX

Prerequisite: Enable “Dev Hub” in your Production Org. 1. Log in to the Dev Hub To authorize the Dev Hub, use the web login flow

Platform Events

Platform event is based on Event-driven architecture. Unlike request-response communication models, software architecture built on an event-driven model decouples event producers from event consumers, thereby