-
Notifications
You must be signed in to change notification settings - Fork 68
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
Prerendering/Server Side Rendering Support #20
Comments
These are the main areas where DOM manipulation happens that we'd need to figure out SSR methods for.
|
Undom may be a good "recommend to the user" solution. |
Re: our recent conversation with @towc
|
|
Since a lot of this is about React, here's a potential solution that could be offered as a separate include in the main Splitting repo: https://codepen.io/shshaw/pen/b9ff364ed9c1ca5d6efffc68317b8de5/
|
This may be a little "un-React-y", but here's a functional component way that could prevent needing to import React or anything within the Splitting Repo while offering a https://codepen.io/shshaw/pen/c2f69f5ac0f1e3e51ac4560669eba50b?editors=0010
|
@shshaw Any updates on this? I'm doing a project based on NextJS and can't easily use Splitting because it relies on document or window 😿 |
@shshaw Sadly can't get it to work even with you proposed "un-React-y" example! Any ETA on this? |
Same here, not working with next.js, I get |
If you're running Vue 3, we've just created a lite adaptation of Splitting designed for Vue 3 which is fully SSR compatible (that's why we made it) |
With
Splitting.html
, it would be fantastic to offer server side rendering support so pre-compiled pages could have elements pre-split so that Splitting wouldn't even need to be delivered to or run on the client.Currently with VuePress, I'm having to do something like this in the
mounted()
function to ensuredocument
is available:Is it possible to utilize JSDOM when Splitting is called server side without delivering JSDOM to the client in the case of Vue components that would utilize Splitting?
Some suggestions from @visiblecode, using a JSON based approach, but this would likely require major restructuring of the way we handle splits:
String approach:
The text was updated successfully, but these errors were encountered: