mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What Display `global-error.js` along with error overlay in development. When a runtime error occurred, you should be able to view the `global-error.js` content by just hiding the error overlay. ### Why Current behavior of `global-error.js` confused a lot of users that it only renders in production build, howerver in dev it's always shows the error overlay. This was considered "expected" before as you should focus on fixing error in dev. But this brings a lot of inconvenience for users, since they can't view the `global-error.js` easily in development but production build. #### After The global-error content is displayed in the html with error overlay covered  #### Before Notice nothing displayed  Fixes #55462 Fixes #52993 Closes NDX-694
6 lines
88 B
JavaScript
6 lines
88 B
JavaScript
'use client'
|
|
|
|
export default function page() {
|
|
throw new Error('client page error')
|
|
}
|