Open
Description
Greetings, @Akryum.
Problem
Vue+Meteor SSR calling the client-side component lifecycle hooks on the server-side:
beforeMount()
;mounted()
.
This results in breaking other packages from the Vue ecosystem, as example:
vue-meta@>=2.3.4
is broken, see: Fix: 500 error using Vue+Meteor SSR after updatevue-meta
version to 2.3.4 nuxt/vue-meta#569.
How to reproduce
- Clone the repo:
git clone https://github.com/mrauhu/meteor-ssr-vue-meta cd meteor-ssr-vue-meta
- Run Meteor:
meteor
Best wishes,
Sergey.
Activity
welkinwong commentedon Jul 18, 2020
same
ismail9k commentedon Oct 4, 2020
Any updates regarding this issue?
ismail9k commentedon Oct 16, 2020
I've managed to fix this issue in my own project. The main idea is to prevent the Vue instance from mounting on the server, by removing the el property from the Vue object on the server-side, then mount the Vue instance manually client side
/client/app.js
/client/startup/index.js
You can test this on my vue-meteor-boilerplate
chore: update readme