#lit/ssr support for external package?

2 messages · Page 1 of 1 (latest)

dull tree
#

Following this link(https://docs.astro.build/en/guides/integrations-guide/lit/), I tried this:

---
import { MyElement } from "../components/my-element.js";
---

<MyElement />

It works, but if I install lit component from external lib:

---
import { CanaryRoot } from "@getcanary/web/components/canary-root.js";
---

<CanaryRoot />

I got this error:

15:59:37 [ERROR] HTMLElement is not defined
  Stack trace:
    at file:///Users/yujonglee/dev/company/canary-demo/node_modules/@getcanary/web/dist/lit-element-4Mp3hwSu.js:79:11
    at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)

@getcanary/web s are lit components.
https://github.com/fastrepl/canary/blob/main/js/packages/web/src/components/canary-root.ts

median crescent
#

Hey @dull tree did you find a solution to this?