-
-
Notifications
You must be signed in to change notification settings - Fork 835
bug: Next.js 13 custom server + SSR + Hydration #4389
Copy link
Copy link
Closed
Labels
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
3.2.2
Current Behavior
This is a extension from the Stencil Discord thread, where a issue was asked to log an issue that can replicate the issues my team is seeing while trying to use NextJS 13.4+ with Stencil 3.3.2 and hydrate renderToString with a custom server to provide the server with a hydrated document.
Example screenshot
Expected Behavior
I expect the server and client to be in sync from an initial render, with the expectation that fetching and interactive elements won't be available
System Info
System: node 16.19.0
Platform: darwin (22.2.0)
CPU Model: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 cpus)
Build: 1682947516
Stencil: 3.2.2 🏒
TypeScript: 4.9.5
Rollup: 2.42.3
Parse5: 7.1.2
Sizzle: 2.42.3
Terser: 5.17.1Steps to Reproduce
The repo linked is a NX/Lerna repo
Note: Created quickly so it's not optimized for ease of use
npm installnpx lerna bootstrapnpx nx run @matt/stencil-components:buildnpx nx run @matt/react-library:build- Non Custom Server -
npx nx run next-13-demo:dev-Warning with extra attribute - Custom Server -
npx nx run next-13-demo:dev:custom-Hydration MismatchError - Breaking
Code Reproduction URL
https://github.com/mbulfair/nextjs13-ssr-hydration
Additional Information
Discord Thread - https://discord.com/channels/520266681499779082/1107698585002319883
Reactions are currently unavailable
