Skip to content

Commit

Permalink
Add note about HMR WebSocket with express to upgrading (#30905)
Browse files Browse the repository at this point in the history
x-ref: #30491 (comment)

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
  • Loading branch information
ijjk authored Nov 3, 2021
1 parent 49347f0 commit 3c5d5b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ location /_next/webpack-hmr {
}
```

For custom servers, such as `express`, you may need to use `app.all` to ensure the request is passed correctly, for example:

```js
app.all('/_next/webpack-hmr', (req, res) => {
nextjsRequestHandler(req, res)
})
```

### Webpack 4 support has been removed

If you are already using webpack 5 you can skip this section.
Expand Down

0 comments on commit 3c5d5b5

Please sign in to comment.