This adds an entry point to @theoplayer/web-ui for Node.js, which uses Lit's SSR DOM shims to replace HTMLElement and customElements. We also make sure not to use document.createElement() during initial load, by lazy-loading all <template> elements.
This allows @theoplayer/react-ui to be loaded during SSG/SSR, such as when using the Server React DOM APIs or when using a full-stack framework like Next.js. You still need to hydrate your React app on the client to make the UI interactive, but that's usually handled by your app framework.
This adds an entry point to
@theoplayer/web-ui
for Node.js, which uses Lit's SSR DOM shims to replaceHTMLElement
andcustomElements
. We also make sure not to usedocument.createElement()
during initial load, by lazy-loading all<template>
elements.This allows
@theoplayer/react-ui
to be loaded during SSG/SSR, such as when using the Server React DOM APIs or when using a full-stack framework like Next.js. You still need to hydrate your React app on the client to make the UI interactive, but that's usually handled by your app framework.