Questions tagged [vue-ssr]

45 questions
0
votes
1 answer

Create a admin panel with vue js(Nuxt SSR) using rest api. Is it secure?

I have a project on e-commerce with Nuxt(Vue framework) and GO(for building API). Now I want to create a separate admin panel. I want to build that admin panel with NuxtJS (Vuejs framework) SSR using RestAPI. I am using PASETO token base auth (like:…
0
votes
1 answer

Ignore this error ==> The client-side rendered virtual DOM tree is not matching server-rendered content

How to perform a full force rehydration ? This happens all the time when there's a if clause for which I use the variable to lazy request only on client side . It stops the entire client side app running(Hydrating) on Production when it encounters…
Bright Chip
  • 31
  • 1
  • 4
0
votes
1 answer

How to use MySQL with Vue SSR directly without REST API backend?

I would like to use MySQL as the data source when fetching for the content during server side rendering so I don't need to create an external API server for the purpose of fetching the data from the database.
zyneragetro
  • 139
  • 1
  • 2
  • 13
0
votes
1 answer

How can I separate out Express routes from server.js?

I have been closely trying to follow this Vue SSR guide and in that example the author has placed his Express routes within a file called server.js. Simply for organisation purposes, I wish to keep my Express routes in a router.express.js file…
volume one
  • 6,800
  • 13
  • 67
  • 146
0
votes
1 answer

How to set InnerText with directive in SSR Vue/Nuxt

I want to port my vue directive to also render server side. client side: mydirective(el,binding,vnode){ el.innerText = vnode.context.$data.points } What i have working so far in nuxt.config.js: render: { bundleRenderer: { directives:…
Timar Ivo Batis
  • 1,861
  • 17
  • 21
0
votes
1 answer

Does the Nuxt "Universal"-mode re-request the page from the Node server every time a new page is requested by the client?

I'm trying to figure out a basic thing about Nuxt "Universal" mode with the help of my dev tools, but I am just not sure if I understand it correctly. Every time I request a new route in the Universal Nuxt app it seems to send a 200 (OK) request to…
0
votes
1 answer

Vue SSR serverPrefetch server redirect with this.$ssrContext.res.redirect

Is it possible to do a redirect from a component, in VUE SSR, without getting the error on the server console: [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client? Code is as follows: serverPrefetch() { // need the data…
Mihai Marinescu
  • 741
  • 8
  • 22
0
votes
2 answers

Vue ssr route.params are being taken from another request

I'm using Akryum/vue-cli-plugin-ssr with vue-cli. Have a weird behavior on my vue ssr application. Route params are being taken from another request that had been made before that one or maybe in parallel with this. For example, if I open two pages…
0
votes
0 answers

Laravel + Vue ssr. Prefetch data

I'm trying to make application lavevel + vue with server side render. I have found this manual and it works perfect. Bu there is a small problem. I need fetch data before page loading for SEO issues and I found official vue ssr manual for prefetch.…
Andrii
  • 324
  • 3
  • 16
0
votes
1 answer

Error: render function or template not defined in component: anonymous

Trying the example from the guide from https://ssr.vuejs.org/guide/#using-a-page-template but there must be something missing in the tutorial. const Vue = require('vue'); const server = require('express')(); const vssr =…
Daniel W.
  • 31,164
  • 13
  • 93
  • 151
0
votes
1 answer

How to get methods declared in vue inside swiper events

How to get methods declared in vue inside swiper events? export default { data() { let obj = { swiperOption: { ... on: { init: function () { //need call…
Dmitriy
  • 95
  • 6
0
votes
1 answer

Vue.js client-side hydration works in development but fails in production

I decided to build my own Vue SSR template that I could use for my projects. It's partially based on this example. Everything was fine and worked as expected. And it still does on the dev-server) But when I'd built the app for production I suddenly…
iloginow
  • 133
  • 1
  • 7
0
votes
0 answers

vue ssr webpack configuration

I have webpack.server.config const merge = require('webpack-merge') const webpack = require('webpack') const nodeExternals = require('webpack-node-externals') const baseConfig = require('./webpack.base.conf.js') const VueSSRServerPlugin =…
0
votes
0 answers

window is not defined in afterEach (Global After Hooks) - VueJs Router

I am getting error as window is not defined in afterEach route hooks. router.afterEach((to, from) => { console.log(window); // need to track ga event here. }); I think afterEach route hooks execute on server-side render-time, so window is…
Mukund Kumar
  • 21,413
  • 18
  • 59
  • 79
-1
votes
2 answers

Vue SSR issue with no ssr

I'm using my own SSR boilerplate for Vue. https://github.com/Djancyp/luna-vue-ssr-boilerplate All working fine pages are SSR rendering. The issue that I'm currently having is no SSR components are failing as soon as I import them to…
can onurer
  • 31
  • 1
  • 4
1 2
3