Skip to content

tony/docusaurus-custom-element-issue

Repository files navigation

Debugging docusaurus custom element issue

Component: Potentially docusaurus-theme-live-codeblock, possibly something else in the build system.

Ongoing discussion thread: facebook/docusaurus#5614

Source and demo sites

What

<o-embed>, a custom element written in lit element

Where

static/js/o-embed.bundled.js: rollup UMD output of @social-embed/wc

Loaded via docusaurus.config.js:

  scripts: ['/js/o-embed.bundled.js'],

index.js

<Playground className="language-html">{`<o-embed\n  url="https://youtu.be/FTQbiNvZqaY"\n  width="100%"\n></o-embed>`}</Playground>

What breaks

Live component on the front page in 2.0.0-beta 1 and up (front page)

What still works

Manual / normal JSX / MDX of <o-embed> in all versions

About

Issues with custom elements / lit / LitElement on live code blocks in docusaurus

Resources

License

Stars

Watchers

Forks