Prevent Next.js from removing all of its styles on hydration (#18723)
Next.js would try to "recover" if its CSS assets went missing (i.e. a deployment occured) **while the page was initially loading**. This handled a rare case where we'd try to let the Next.js complete hydrating even though a deployment occured. However, in practice, this never worked: if the `fetch()` failed, that means the original assets never downloaded themselves (because the `fetch()` should be coming from disk cache). Instead of letting Next.js get itself into a weird state, let's just stop hydration so that the page doesn't accidentally delete its styles. The handle-no-styles behavior is already tested in `test/integration/css/test/index.test.js`. There was never a branch for it using its cached styles, so nothing else needs updated. --- Fixes #17930
Showing
想要评论请 注册 或 登录