prashantpalikhe / nuxt-ssr-lit

SSR support for Lit elements in Nuxt3
Other
47 stars 7 forks source link

fix(#36): always load the dom shim if the nuxt-ssr-lit module is used #37

Closed prashantpalikhe closed 1 year ago

prashantpalikhe commented 1 year ago

Adding the DOM shim also as a server plugin ensures that when the nuxt-ssr-lit module is used, the shim is applied. Otherwise, the shim gets applied ONLY when one of the components is being used in one of the Nuxt pages. This breaks in situations where a component may not be used in any of the pages, but the component definition is still being imported. Then customElement.get won't be available.

steveworkman commented 1 year ago

LGTM