webcomponents.org
webcomponents.org copied to clipboard
[catalog-server] Element declarations in separate modules not found
Try @lion/button/lion-button-submit
in a local dev environment: http://localhost:5450/catalog/element/@lion/button/lion-button-submit
This page errors because no declaration is found.
There are at least three problems here:
- The page should show more about the error
- No problems are recorded with the PackageVersion document
- The manifest appears correct. The custom element definition and declaration (the class) are in separate modules and we don't seem to resolve the reference to the declaration correctly.
We see the custom element export in the lion-button-submit.js
module:
{
"kind": "javascript-module",
"path": "lion-button-submit.js",
"declarations": [],
"exports": [
{
"kind": "custom-element-definition",
"name": "lion-button-submit",
"declaration": {
"name": "LionButtonSubmit",
"module": "/src/LionButtonSubmit.js"
}
}
]
},
The module has no declarations because it just imports and registers an element:
import { LionButtonSubmit } from './src/LionButtonSubmit.js';
customElements.define('lion-button-submit', LionButtonSubmit);
The declaration is in the src/LionButtonSubmit.js
file:
{
"kind": "javascript-module",
"path": "src/LionButtonSubmit.js",
"declarations": [
{
"kind": "class",
"description": ...,
"name": "LionButtonSubmit",