Skip to content

Commit

Permalink
Disable webpack-dev-server runtime error overlays
Browse files Browse the repository at this point in the history
Runtime errors are expected sometimes, especially during development,
and handled by error boundaries.
  • Loading branch information
mfisher87 committed Nov 16, 2023
1 parent 37e263b commit f2a7c33
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ The codebase could be much simpler if we eliminated ReactQuery -- we're not usin
its mutation features anyway.


### Webpack dev server

[v4.12.x-v4.15.x](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
added overlays for runtime errors and unhandled promise rejection. These seem to be
triggered by errors that we are handling with error boundaries. Disabled runtime error
overlays to work around. We need to add handling for the runtime errors, or figure out
why webpack-dev-server isn't understanding our error boundaries.


## Versioning

* How to keep track of compatibility between the server (data schemas) and this app
Expand Down
7 changes: 7 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ const config = {
allowedHosts: 'all',
// Enable hot reloading over websocket port through Docker port map:
hot: true,
client: {
overlay: {
// Don't display overlay for runtime errors; adding in 4.12.0
// TODO: Remove!
runtimeErrors: false,
}
},
},
plugins: [
new HtmlWebpackPlugin({
Expand Down

0 comments on commit f2a7c33

Please sign in to comment.