Skip to content

support additional Lit SSR configuration options #1687

@thescientist13

Description

@thescientist13

Motivation

Coming out of #1646 / #1647 , an action item was taken to support additional Lit SSR configurations

  1. additional connected callback tag names
  2. disableSsr

Technical Design

These should be options passed into the plugin, e.g.

import { greenwoodPluginRendererLit } from '@greenwood/plugin-renderer-lit';

export default {
  plugins: [
    greenwoodPluginRendererLit({
      connectedCallbackTags: [/* ... */], // array of strings / Regexs to test against
      disableSsrTags: [/* ... */], // array of strings / Regexs to test against
    })   
  ]
}

Additional Tasks:

  1. Update the types
  2. Add documentation - document default page export support for Lit SSR based routes www.greenwoodjs.dev#273

Additional Context

As bonus points, would be nice to resolve this Rollup bundling logging (maybe just silence with a plugin?)

../../../../../node_modules/@lit-labs/ssr-dom-shim/lib/events.js (6:30): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten

Metadata

Metadata

Labels

PluginsGreenwood PluginsSSRTypes(cript)Requires type definition or TypeScript related work / documentationalpha.7documentationGreenwood specific docsfeatureNew feature or requestv0.34.0
No fields configured for Feature.

Projects

Status
🔖 Ready

Relationships

None yet

Development

No branches or pull requests

Issue actions