-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
SSR in dev (2.0) #1290
Comments
Can you elaborate on what |
Then you can use it like this: transformRequest('/render-routes/index.js', { ssr: true })
// result, string => `module.exports = { /* server-compatible code */ }` |
Yes, this is on the roadmap, just don't want to finalize the API before I get a working prototype running on top of it. FWIW, you can already use the |
Don't you think it's time to pay attention to SSR? For all the elegance and work that goes into the Vue/Vite ecosystem, rendering the source has always been a super complicated, undocumented experience. Typically I'd "roll my own" solution, but very few of us understand the nuances of rendering SFCs and I've always personally felt like a decent effort to support metatags and SEO with Vue must be around the corner from the core team. |
@arpowers I'll pay attention to it when I think it's time. This is open source and you are not paying me money to prioritize things you want. |
@arpowers Isn't there a guide at https://ssr.vuejs.org/? Vite is a fairly new project, especially Vite 2.0 (a month old? not even). If you feel SSR is a must for your use-case I'd suggest using a more mature build tool. |
Closing (landed) |
I'm currently building a vite-plugin-ssr, the goal being to provide an interface à la Nuxt/Next.js. Anyone else inerested in this? |
@brillout very much interested, how can we help ? |
Almost done. To get a preview of what
By using it :) I will post a comment in this ticket as soon as a first beta is ready to be used. |
Finished the implementation of https://github.com/brillout/vite-plugin-ssr. The API and overall design are stable. Beta is released. Stable |
Is your feature request related to a problem? Please describe.
Vite 2.0 beta doesn't seem to have any sort of SSR solution included, I assume it's still in development and things might catch up later?
Describe the solution you'd like
A new
transformRequest
API to load and transform a URL and get the result that is optimized for server:transformRequest(url, { ssr: true })
Plugins should also be able to tell if it's requesting the build for server.
Describe alternatives you've considered
No other solution is available, maybe I'm missing something.
Additional context
Trying to build something like Nuxt.js using Vite, SSR in dev is necessary.
The text was updated successfully, but these errors were encountered: