Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rehydrate dynamic components #3

Open
twilson63 opened this issue Jun 12, 2019 · 1 comment
Open

rehydrate dynamic components #3

twilson63 opened this issue Jun 12, 2019 · 1 comment

Comments

@twilson63
Copy link
Owner

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.

@twilson63
Copy link
Owner Author

I have a basic example working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant