N
Nuxt6mo ago
abd

fetch happening on server-rendering in dev mode but not in production

Hello, General information 1. I am running my app on heroku 2. these are my script commands
"scripts": {
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"build": "nuxt build",
"start": "node .output/server/index.mjs"
},
"scripts": {
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"build": "nuxt build",
"start": "node .output/server/index.mjs"
},
My issue is as follows: 1. I am using useFetch in a page component. 2. When running in local development, the fetch is being called server side and the page is loading with the returned data in NUXT_DATA 3. When running in production however this is not happening. It wont call on serer side (and only calls on client side when doing client side routing) What am I doing wrong here?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server