Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ssr support #73

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

feat: add ssr support #73

wants to merge 2 commits into from

Conversation

zeroedin
Copy link
Collaborator

@zeroedin zeroedin commented Jul 17, 2023

EXPIREMENTAL PR - DO NOT MERGE

Attempt using labs/eleventy-plugin-lit to provide SSR support mentioned in #70

@changeset-bot
Copy link

changeset-bot bot commented Jul 17, 2023

⚠️ No Changeset found

Latest commit: 15da2ab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Jul 17, 2023

Deploy Preview for prismatic-souffle-43beb6 failed.

Name Link
🔨 Latest commit 15da2ab
🔍 Latest deploy log https://app.netlify.com/sites/prismatic-souffle-43beb6/deploys/64b58bf0bd706d0008365ff1

@zeroedin
Copy link
Collaborator Author

zeroedin commented Jul 17, 2023

Initial issue: MutationObserver not defined in context provider after configuration.

Might be an known issue? Reference: lit/lit#2490

Unexpected error while rendering lit component in worker thread ReferenceError [Error]: MutationObserver is not defined
    at new ColorContextProvider (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@rhds/elements/lib/context/color/provider.js:25:48)
    at file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@rhds/elements/lib/context/color/provider.js:119:32
    at file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit/reactive-element/node/reactive-element.js:6:2438
    at Array.forEach (<anonymous>)
    at RhCard.u (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit/reactive-element/node/reactive-element.js:6:2426)
    at new p (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit/reactive-element/node/reactive-element.js:6:731)
    at new s (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/lit-element/lit-element.js:6:54)
    at new RhCard (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@rhds/elements/elements/rh-card/rh-card.js:35:9)
    at new LitElementRenderer (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit-labs/ssr/lib/lit-element-renderer.js:18:24)
    at getElementRenderer (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit-labs/ssr/lib/element-renderer.js:20:20)
[11ty] Uncaught exception: (more in DEBUG output)
[11ty] MutationObserver is not defined (via ReferenceError)
[11ty] 
[11ty] Original error stack trace: ReferenceError: MutationObserver is not defined
[11ty]     at new ColorContextProvider (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@rhds/elements/lib/context/color/provider.js:25:48)
[11ty]     at file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@rhds/elements/lib/context/color/provider.js:119:32
[11ty]     at file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit/reactive-element/node/reactive-element.js:6:2438
[11ty]     at Array.forEach (<anonymous>)
[11ty]     at RhCard.u (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit/reactive-element/node/reactive-element.js:6:2426)
[11ty]     at new p (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit/reactive-element/node/reactive-element.js:6:731)
[11ty]     at new s (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/lit-element/lit-element.js:6:54)
[11ty]     at new RhCard (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@rhds/elements/elements/rh-card/rh-card.js:35:9)
[11ty]     at new LitElementRenderer (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit-labs/ssr/lib/lit-element-renderer.js:18:24)
[11ty]     at getElementRenderer (file:///Users/sps/Sites/_brand/red-hat-brand/node_modules/@lit-labs/ssr/lib/element-renderer.js:20:20)

I might be missing something from the configuration, will poke at this more later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant