Skip to content

Add integration tests for Vite/Rollup setups w. & w/o Lit SSR parity + hydration checks #4

@JulianCataldo

Description

@JulianCataldo

With absolutely no changes to the actual codebase, integrating the rollup plugin in a Vite + Lit SSR full-stack setup was able to provide all expected features for:

  • Static Dev
  • Static Build
  • Server Dev (same as Static Dev anyway)
  • Server Build
  • Hydration etc. all working with the default preset (which is quite conservative)

And if the user don't want minification in dev — which is unexpected, I thought it would require some work on the Vite side — it's really easy to leverage the command switches in Vite's defineConfig.

Here is a fully working example

Since it's working really well with Lit SSR server and client JS bundles/chunks, and during with the Vite dev server and HTML transformer, it could be worth it to add integration tests, with node:test own snapshot testing for all modes, and potentially with Playwright for client-side hydration tests.

This will benefit to Rollup users who wants to do their SSR+Client bundle with hydration, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions