-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[Doc/Tuto] Example of prerendering for vue. #897
Comments
@mathieutu thanks for posting this. Was helpful. |
|
@frandiox also took a look at your repo as well, also good. I've been struggling with some fringe issues like teleports in SSR (metatags), will report back on where things end up. |
Actually, I've just found there where some breaking changes in rc7 and rc9 which break the build process. You need to adapt it to the new versions. |
@mathieutu @frandiox you SSR pros have thoughts on this issue? #972 |
@arpowers I'm far from pro 😂 |
You don't think that it's fundamentally important to match your development and production environments? Hydration and pre-fetching are error-prone enough where I don't feel comfortable developing without SSR. |
@arpowers It is indeed important and I hope they support build watch at some point. However, Vite is still under development and I don't think we can do anything but wait (there are PRs open but not enough people to manage them). In the meantime, you can go with SPA approach at least if this issue is stopping you from building your app 🤔 |
It's for a next-gen framework, Factor 7 |
Closing (stale) |
Hi,
I made a simple landing page with vue 3 and vuejs, and would like to prerender it for seo and performance (and usage with netlify form).
I was looking for an existing solution, but didn't find anything, so I've dug in the builder of vite and made my own script. I tried to make it as simple as possible, and at the end it's pretty straightforward, but I've spent few hours to understand vite and rollup build, and I think it can be of interest to some people (you can start from there for SSR too).
I share it in the issue to keep a record, but I think it can be good to add some documentation about prerendering and ssr with vite and vue3.
Please feel free to give me your feedbacks, so we can improve it.
Prerendering with vite and vue3
Update you
main.js
fileAdd a
build.js
fileUpdate you
build
script.Have fun! 🎉 (and please share me your thoughts!)
Moreover, I've only one file here, but next step could be to generate several pages depending of routes.
The text was updated successfully, but these errors were encountered: