Lightning Web Componentで開発していて、カスタム要素を使用する時に詰まったのでメモしておく。
No MODULE named markup://salesforceから認識されているコンポーネント found : [markup://それに近そうなコンポーネント]
コンポーネントの命名をする前に、他のコンポーネントでコンポーネントを使用する場合には、カスタム要素の先頭に「c-」をつける必要がある(名前空間) 「samplecomponent」の場合
<template>
<c-samplecomponent></c-samplecomponet>
</template>
コンポーネントの名前に大文字を含む場合ハイフンを入れる必要がある。 「sampleComponent」の場合
<template>
<c-sample-component></c-sample-componet>
</template>
コンポーネントの名前にアンダーバー(_)を含む場合はそのままカスタム要素に入れる。 「sample_component」の場合
<template>
<c-sample_component></c-sample_componet>
</template>
「sample_Component」
<template>
<c-sample_-component></c-sample_-componet>
</template>
「sampleCOMPONENT」
<template>
<c-sample-c-o-m-p-o-n-e-n-t></c-samplec-sample-c-o-m-p-o-n-e-n-t>
</template>
コンポーネントの名前に大文字を連続させると面倒なことになるので小文字で完結できるような命名規則にするといい