-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
16 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters