这是我的 next.js 代码:https://github.com/albbus-stack/personal-site。
当我在 vercel 上将我的网站推送到生产环境时,此问题存在于 https://github.com/albbus-stack/personal-site/blob/main/pages/index.js 页面中;当我在本地运行它时一切正常,带有我名字的 h1 只呈现一次。更奇怪的是,如果我在第一次渲染后刷新部署的页面,它会正确呈现。
您可以在 https://site-one-eta.vercel.app/ 的生产部署中看到自己。
附上图片:bad first render on production, same production page after refresh