twilson63 / ipress2

Ipress2 is a static generator using MDsveX - experimental

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rehydrate dynamic components

twilson63 opened this issue · comments

It would be cool, to inject a script in each staticly generated file, if a flag is set to include the dynamic component of the ssr generated component. Then when the static html page renders in the browser it will execute the included script and hydrate from the element with the id that matches the name of the file, which should make all dynamically declared events hot.


In rollup, I believe there is a way to run two build steps, one to build the ssr generated components and one to build the esm generated components. I would need to output the esm components in a scripts directory. then copy them into the dist directory and a build step.


Should be fun to try it out.

I have a basic example working