You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The nitro plugin looks for the serverRendered property at index 1 of the nuxtData array. But in my case this information is found at index 0. I'm not sure, why this is the case. I'm sorry, I don't have the time to create a reproducible case. Maybe it's because I use type "module" in package.json or use generate command for static hosting (nuxt version 3.5.2). But maybe it would be safer in general to use something like a find function with hasOwn('serverRendered') instead of hardcoding the index, or use the data-ssr attribute.
Here is a screenshot of the nuxtData object using debugger:
The text was updated successfully, but these errors were encountered:
A workaround that currently works for me is setting the experimental configuration parameter renderJsonPayloads to false. This way the NUXT_DATA_RE regex does not find the script, the nuxtData variable is null and the second check (ssrContext.includes("serverRendered:true")) returns true.
The nitro plugin looks for the
serverRendered
property at index1
of thenuxtData
array. But in my case this information is found at index0
. I'm not sure, why this is the case. I'm sorry, I don't have the time to create a reproducible case. Maybe it's because I use type "module" in package.json or usegenerate
command for static hosting (nuxt version 3.5.2). But maybe it would be safer in general to use something like afind
function withhasOwn('serverRendered')
instead of hardcoding the index, or use thedata-ssr
attribute.Here is a screenshot of the nuxtData object using debugger:
![image](https://private-user-images.githubusercontent.com/57012534/248674343-9b88de51-5253-477f-a80a-ee16e110f606.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTE1OTksIm5iZiI6MTczODk1MTI5OSwicGF0aCI6Ii81NzAxMjUzNC8yNDg2NzQzNDMtOWI4OGRlNTEtNTI1My00NzdmLWE4MGEtZWUxNmUxMTBmNjA2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE4MDEzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM1Y2E3YzYyYmRmZmU0NzAwZjc0NTJiOWNlMThhMGU1NDVmMjBhYmEyOGE4ZDI1NDhmZmI3ZjA2MDc4OTkyODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IpJuKEHymmQgANPbUyJE1kop0ZWZX_l5gGfgs-zTp38)
The text was updated successfully, but these errors were encountered: