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

replace toSorted with sort equivalent (not in-place) #1

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

gwright170
Copy link
Contributor

Hey @wille 👋

I love what you've been working on here and have been trying to integrate it into a Vite project I'm working on. One of the first things I noted was a lack of support for Node versions pre Node v20 (I am personally using Node 18), due to the use of toSorted. I've proposed a small change to get sort on an array spread - LMK what you think!

An aside

I noticed that you've been struggling with FOUC on dev and I know Remix were having a similar issue when they migrated to Vite. From this talk at Vitecon (https://youtu.be/mWK3Y_1kmaM?t=29878&feature=shared) it looks like they were able to get around that in a clean way. If you're interested I think the PR is remix-run/remix#8076.

I'm keen to explore features like partial hydration, is that something you'd be open to having in the library?

@wille
Copy link
Owner

wille commented Oct 17, 2024

Thank you for your contribution!

Also thanks for linking the talks. I've been looking into what they describe and had a proof of concept but ditched it, I'll definitively revamp that and get it working for the local dev environment as well.

Please elaborate more on what specifics of partial hydration you would see fit in this library.

Right now this library doesn't really support streaming at onShellReady, we need to render the full tree to generate the headers and head tags to send to the client.

@wille wille merged commit 8d60cd2 into wille:master Oct 17, 2024
@gwright170
Copy link
Contributor Author

@wille I have been able to get it working in dev mode with https://github.com/hi-ogawa/vite-plugins/tree/main/packages/ssr-css. Looks like you could copy/adapt the style collection utilities - vitejs/vite#16515 (comment).

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

Successfully merging this pull request may close these issues.

2 participants