seancdavis
seancdavis
NNuxt
Created by seancdavis on 2/26/2025 in #❓・help
Hydration and caching issues on universal rendering page
I was trying to show that by running with and without --preset netlify is that the behavior of the /polls/[id] route is different. Not sure exactly how Nuxt resolves what runs on server vs client. Can you share more about that, @manniL ?
17 replies
NNuxt
Created by seancdavis on 2/26/2025 in #❓・help
Hydration and caching issues on universal rendering page
Yes. I meant headers. That makes sense. The others should be generated at runtime and get moved to the serverless SSR function.
17 replies
NNuxt
Created by seancdavis on 2/26/2025 in #❓・help
Hydration and caching issues on universal rendering page
--- In addition, the Netlify adapter adds a _headers file and I noticed that it doesn't pick up the redirects mentioned in the page file (src/pages/polls/[id].vue). Going to check with the team on that one.
17 replies
NNuxt
Created by seancdavis on 2/26/2025 in #❓・help
Hydration and caching issues on universal rendering page
I then ran netlify build to see what the difference is, and I noticed that the adapter puts everything in dist, doing all the transformations in the process. Does that make it seem like #1 and #2 are Netlify adapter issues?
17 replies
NNuxt
Created by seancdavis on 2/26/2025 in #❓・help
Hydration and caching issues on universal rendering page
@TheAlexLichter Ahhh, okay. Progress... After yarn build, I can preview with node .output/server/index.mjs. I don't get a hydration error and I see content in the initial response:
<body>
<div id="__nuxt">
<div>
<div
class="bg-gradient-to-b from-slate-800 to-slate-950 min-h-screen text-white"
>
<header></header>
<main class="max-w-5xl mx-auto px-8 py-8">
<div class="mb-16 pt-12 text-center">
<h1 class="text-3xl sm:text-4xl font-bold tracking-tight">
Is this an example question?
</h1>
</div>
<!-- ... -->
</main>
<footer></footer>
</div>
</div>
</div>
<!-- ... -->
</body>
<body>
<div id="__nuxt">
<div>
<div
class="bg-gradient-to-b from-slate-800 to-slate-950 min-h-screen text-white"
>
<header></header>
<main class="max-w-5xl mx-auto px-8 py-8">
<div class="mb-16 pt-12 text-center">
<h1 class="text-3xl sm:text-4xl font-bold tracking-tight">
Is this an example question?
</h1>
</div>
<!-- ... -->
</main>
<footer></footer>
</div>
</div>
</div>
<!-- ... -->
</body>
17 replies