Skip to content

feature(plugins): #1646 support lit ssr default export for pages and layouts including dynamic routing#1647

Merged
thescientist13 merged 1 commit into
masterfrom
feat/issue-1646-lit-ssr-default-export-pages
May 30, 2026
Merged

feature(plugins): #1646 support lit ssr default export for pages and layouts including dynamic routing#1647
thescientist13 merged 1 commit into
masterfrom
feat/issue-1646-lit-ssr-default-export-pages

Conversation

@thescientist13

@thescientist13 thescientist13 commented Feb 21, 2026

Copy link
Copy Markdown
Member

Related Issue

resolves #1646

Documentation

  1. document default page export support for Lit SSR based routes www.greenwoodjs.dev#273

Summary of Changes

  1. Support export default for SSR pages and layouts
  2. Support dynamic routing / constructor props (as attributes)

TODO

  1. connectedCallback support - https://github.com/lit/lit/tree/main/packages/labs/ssr#notes-and-limitations
  2. more test cases
  3. should globalThis.litSsrCallConnectedCallback be configurable? - N / A, as the new version will be opt-in at the LitElement definition
  4. support constructor props / dynamic routing (should an example to chore: upgrade Greenwood v0.34.0 thescientist13/greenwood-lit-ssr#39 )
  5. custom element as layout
  6. Update for new implementation (and update README) - [labs/ssr] Add configuration on LitElementRenderer for calling connectedCallback on LitElement subclasses lit/lit#5265
    • can we re-disable isolation in search API?
  7. README / documentation cleanup
    • caveats
    • constructor props as properties for default export pages + dynamic routing
  8. align on imports map change / resolutions - https://github.com/ProjectEvergreen/greenwood/pull/1647/changes#r3253292087
  9. support additional configuration options from plugin options and document (nice to have / own issue, or add caveat in the README) - deferred to support additional Lit SSR configuration options #1687
    • additional connected callback tag names
    • disableSsr
  10. the ever omnipresent Rollup bundling logging (maybe just silence with a plugin?) - deferred to support additional Lit SSR configuration options #1687
    ../../../../../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

@thescientist13 thescientist13 self-assigned this Feb 21, 2026
@thescientist13 thescientist13 added documentation Greenwood specific docs Plugins Greenwood Plugins SSR feature New feature or request labels Feb 21, 2026

@thescientist13 thescientist13 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a heads up the implementation here will need to change, as a breaking change is coming soon from the Lit side

@thescientist13 thescientist13 changed the title feature(plugins): #1646 lit ssr default export ssr pages support feature(plugins): #1646 lit ssr default export ssr pages support and dynamic routing Apr 4, 2026
@thescientist13 thescientist13 changed the title feature(plugins): #1646 lit ssr default export ssr pages support and dynamic routing feature(plugins): #1646 support lit ssr default export pages and dynamic routing Apr 4, 2026
@thescientist13 thescientist13 force-pushed the feat/issue-1646-lit-ssr-default-export-pages branch from 78dcd37 to 38d1a21 Compare May 16, 2026 16:29
"@lit/reactive-element/decorators/state.js": "/~/Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/@lit/reactive-element/decorators/state.js",
"@lit/reactive-element/polyfill-support.js": "/~/Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/@lit/reactive-element/polyfill-support.js",
"@lit/reactive-element/reactive-controller.js": "/~/Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/@lit/reactive-element/reactive-controller.js",
"lit": "/~/Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/node_modules/lit/index.js",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... these import maps changes, and also in #1645 have odd paths? Due to the resolution? 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe because we are bumping to Lit SSR v4? Though I wonder, why this wouldn't get scoped to the Lit renderer package instead?

@thescientist13 thescientist13 marked this pull request as ready for review May 16, 2026 18:43
@thescientist13 thescientist13 changed the title feature(plugins): #1646 support lit ssr default export pages and dynamic routing feature(plugins): #1646 support lit ssr default export for pages and layouts including dynamic routing May 16, 2026
@thescientist13 thescientist13 force-pushed the feat/issue-1646-lit-ssr-default-export-pages branch from 8cfca7f to b9d7eba Compare May 30, 2026 23:11
@thescientist13 thescientist13 merged commit f7c3bac into master May 30, 2026
10 checks passed
@thescientist13 thescientist13 deleted the feat/issue-1646-lit-ssr-default-export-pages branch May 30, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Greenwood specific docs feature New feature or request Plugins Greenwood Plugins SSR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enable support for default custom element definition exports for Lit SSR pages and layouts

1 participant