-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Comparison with NextJS #158
Comments
Wrote first things that came to mind, will revisit and add more
|
That's actually already the case 😊 @gryphonmyers has been busy but he'll have more time soon and we'll finish up the deep Vue Router integration. The new hook
Tracking ticket: #95 and I'll start the implementation today. The conceptual/design part is done. EDIT: done. |
Could this issue be renamed to "Comparison with NextJS"? To be easier for people to find. This comment #209 (comment):
by @patryk-smc belongs here. Since that issue is for providing a migration guide. (Update: I imported the comparison table here, further down in this issue). |
Done 👍. |
I took the aforementioned comment by @patryk-smc, imported his comparison CSV to Excel, and then converted it to markdown, so it could be shared here, for people to enjoy: (I added some info/links in brackets, and I'll try to keep the table updated as you add comments here with new info) Update: This table has now been upstreamed and added to the webpage, so the latest version can be seen here: https://vite-plugin-ssr.com/nextjs-comparison#detailed-comparison-table Original (no longer updated) table below, archived for posterity:
* - Vite/vite-plugin-ssr do not ship those extras by design. |
Maybe @patryk-smc could explain this row a little bit?
|
@redbar0n To run Vite+VPS you need some sort of http server that invokes VPS, e.g. Express. Next.js comes with a built-in server, yet it supports http servers like Express too. |
ah ok, makes sense, I got a bit confused due to Serverless deployments there for a while. Since vite-plugin-ssr does support serverless deployments (CloudFlare Workers, Vercel, Netlify, etc.).
I thought NextJS used Express under the hood, but apparently it uses a vanilla HTTP server. In any case, using a custom server in NextJS has some disadvantages like "initial time investment learning custom nextJS server patterns", and since "you can't deploy custom servers to Vercel" it means that "you don't get serverless functions" support out of the box with NextJS then. On the other hand, vite-plugin-ssr allows you to use the HTTP & GraphQL server combo you like. Which paves the way for some performance optimizations... (if you should at all care about it...). But if you care about it, I found that Hyper-Express + Benzene is the fastest (bench1, bench2) Node HTTP server & GraphQL server combo, that also has JIT enabled, as of 2022-09-04. Another fast setup would be Fastify Mercurius + graphql-JIT. In any case, for clarity / accuracy, I will rename:
To:
|
@redbar0n That makes sense. It's a complicated topic with numerous options. Tricky to fit in into comparison table. I, personally, deploy to Vercel. |
It's a yes: https://vite-plugin-ssr.com/i18n and many users do this. It's slightly more boilerplate than Next.js but, as usual, you get much more control. |
We could add a line about RSC. RSC (React Server Components) | Work-in-progress | Yes, experimental |
But in the industry framework right now, like Qwik, NuxtJs, NextJs, Svelte Kit, or Astro. Can you point out what precisely the main focus of this plugin? I mean I'm from the point of view of the user, and I need to know the points of each tool - To match our purpose's products. And I think you should put this conversation's result on the readme of repo 😆. |
The way I see it is this: if you read the landing page |
Since it's useful documentation, and was requested in vikejs#158 (comment)
Sourced with the relevant info from issue vikejs#158
Sourced with the relevant info from issue #158
Next.js comparison table updated and live at https://vite-plugin-ssr.com/nextjs-comparison. |
Awesome! Image component → Currently just says "No". What is the recommended solution if using VPS? A link would be helpful. Especially since NextJS image component is so praised and could be perceived as a unique benefit there. Internationalization (i18n) → |
This could use some backing, like:
|
Done.
Done. Changed Next.js's support to "Limited".
The plan is to implement Stem Relay. That should be enough evidence 😁. |
Under "Server/deployment agnostic" it's possible to mention that NextJS uses their own internal web server. If you want to use another server like Fastify you'd have to use fastify-nextjs. But if you want to use the fastest HTTP server which is currently hyper-express then you're out of luck, because no one has made a NextJS integration yet. But with vite-plugin-ssr you could easily use it as is. That's a good argument for those concerned with scaling Update: That is, the server load is important mostly if you care about scaling in terms of HTTP servers. You could argue scaling is largely solved by going Serverless (like Next.js leans on, since it's tailored for deployment on their serverless platform, Vercel), but it often comes at a cost of some form of vendor-lock in. |
Done aed7eae. |
From reddit @redbar0n:
I've a lot on my plate already, so I'd be up for someone explaining why vite-plugin-ssr is a fundamentally more robust tool than Next.js.
This could be in the form of a blog post we'd share on the landing page of https://vite-plugin-ssr.com/. Or just a comment in this ticket.
The text was updated successfully, but these errors were encountered: