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

docs: refactor ssr #166

Merged
merged 5 commits into from May 19, 2021
Merged

docs: refactor ssr #166

merged 5 commits into from May 19, 2021

Conversation

brillout
Copy link
Contributor

Rendered version: https://github.com/brillout/awesome-vite/tree/refactor-ssr#ssr.

Follow up of https://discord.com/channels/804011606160703521/804061937029218334/844266963244941348.

The plan is to add a link to the SSR section at https://vitejs.dev/guide/ssr.

@frandiox How about we change the description of vite-ssr? Maybe SSR with bring your own router?

cc @patak-js

@brillout
Copy link
Contributor Author

Also btw my plan is to then ping all the people I know who build SSR tools to add their tool to that list. But I'd suggest to first focus on the refactor to quickly get it merged first.

README.md Outdated
- [vite-ssr](https://github.com/frandiox/vite-ssr) ![react] ![vue3] - Server-side rendering.
- [vite-plugin-ssr](https://github.com/brillout/vite-plugin-ssr) ![react] ![vue3] ![vue2] ![svelte] - Like Nuxt/Next.js but as a do-one-thing-do-it-well plugin.

### Frameworks & Boilerplates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we should separate them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


- ![v3] [vite-ssg](https://github.com/antfu/vite-ssg) - Server-side generation.
- ![v3] [vite-ssr](https://github.com/frandiox/vite-ssr) - Server-side rendering.
- ![v3] [vitedge](https://github.com/frandiox/vitedge) - Edge-side rendering with fullstack utilities.

Copy link
Member

@antfu antfu May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we extract SSR into another section, maybe it's better to add a line saying that "Refer to the SSR section for SSR supports"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Copy link
Member

@antfu antfu May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like, I might look into the Vue section and trying to find the SSR support for Vue. But now we move it to another section, which might confuse ppl like "Oh Vite does not support SSR for Vue?" or some sort of the things.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

I've decided to remove the SSR Boilerplates section because the whole idea here is to let users know about higher-level alternatives to Vite's native SSR API; boilerplates are not contributing here.

README.md Outdated Show resolved Hide resolved
brillout and others added 2 commits May 19, 2021 11:52
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
@antfu antfu merged commit 185ee4d into vitejs:master May 19, 2021
@antfu
Copy link
Member

antfu commented May 19, 2021

Thanks!

@frandiox
Copy link
Contributor

frandiox commented May 19, 2021

@brillout Thanks for the PR! Would be better indeed to change vite-ssr description but I'm not sure if "bring your own router" is the best because vite-ssr requires specific routers.

I think the main benefit of this library is that it sets up most of SSR for you with a relatively small API surface, so perhaps just "Simplified Server Side Rendering" could work? I'm so bad at names and descriptions 😂

-- Edit: looks like I'm late for 10 seconds lol

@brillout
Copy link
Contributor Author

@frandiox Yea but there is actually a bug in the merged PR so I'm creating a second PR :D Your chance to ride along :P.

Ok I'll modify to Simplified Server Side Rendering in my new PR. Yea naming & succinct descriptions are quite hard.

@antfu
Copy link
Member

antfu commented May 19, 2021

@brillout if you mean the #ssr-1 bug, yeah I am aware of it and already fixed

@brillout
Copy link
Contributor Author

Ah, actually antfu was actually faster, it's already fixed.

But yea would be nice to improve the description of vite-ssr. IMO I find Simplified Server Side Rendering is better but still not ideal.

The reason I was aiming for something like bring your own router is because the way I see it is that the fundamental difference between vite-ssr and vite-plugin-ssr is routing.

@antfu
Copy link
Member

antfu commented May 19, 2021

Feel free to send PR to modify the descriptions of your packages whenever you found a better name :)

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.

None yet

3 participants