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.
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:
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
commandswitches in Vite'sdefineConfig.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:testown 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.