Skip to content

React Router's default error element is showing above my error element #11700

Answered by tatsmaki
vijtheveg asked this question in Q&A
Discussion options

You must be logged in to vote

This is react-router error window

And this is webpack error window (or vite)

This error won't be visible in production. If you want to adjust it for development – check webpack docs to configure devServer overlay
https://webpack.js.org/configuration/dev-server/#overlay

Something like this will work

devServer: {
    client: {
         overlay: {
             errors: false
         }
    }
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tatsmaki
Comment options

@vijtheveg
Comment options

Answer selected by vijtheveg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants