I'm trying to create a share css style rule for my lwc components following the doc and it doesn't work
I created a LWC component like this
myStyle
--myStyle.css
--myStyle.js-meta.xml
myStyle.css
:host() {
--my-color: red;
}
myStyle.js-meta.xml
<?xml version="1.0" encoding="UTF-8" ?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>49.0</apiVersion>
<isExposed>false</isExposed>
</LightningComponentBundle>
But when I tried to deploy this, I see this error
Error force-app/main/default/lwc/myStyle/myStyle.js-meta.xml No base file for markup://c:myStyle
And it deletes my files!!!
I added the Javascript and HTML files and when I tried to import the css module in another component I get this error: Unknown ref type slds for ref c/myStyle in file..
The doc also it's not very clear. What is the difference between the lwc component described in step 1 and the component in step 2?