Un LWC è composto da tre file:
- File html
- File js
- File xml
Il file xml è il file di configurazione del lightning web component.
Questo file fornisce informazioni sulla versione API, il nome della label con cui viene mostrato e il target dove questo LWC può essere impiegato nell’uso dell’App Builder
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>45.0</apiVersion>
<isExposed>false</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
<targetConfigs>
<targetConfig targets="lightning__RecordPage">
<objects>
<object>Product__c</object>
</objects>
</targetConfig>
</targetConfigs>
</LightningComponentBundle>