-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn when user has pages/_error but no pages/404 (#11603)
* Warn when user has pages/_error but no pages/404 * Update test * Update custom-error-no-custom-404.md * Apply suggestions from code review Co-Authored-By: Tim Neutkens <[email protected]> Co-authored-by: Tim Neutkens <[email protected]>
- Loading branch information
1 parent
9baa103
commit 1cdc607
Showing
5 changed files
with
92 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Custom /\_error without /404 | ||
|
||
#### Why This Error Occurred | ||
|
||
You added a custom `/_error` page without adding a custom `/404` page. Adding a custom `/_error` typically opts your application out of having the automatic static optimization applied to the 404 page. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Add a `pages/404.js` with the 404 page you would like to show. | ||
|
||
### Useful Links | ||
|
||
- [Automatic Static Optimization](https://nextjs.org/docs/advanced-features/automatic-static-optimization) | ||
- [404 Page](https://nextjs.org/docs/advanced-features/custom-error-page#404-page) |
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
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