Skip to content

Commit

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

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
  • Loading branch information
ijjk authored and natew committed Feb 16, 2022
1 parent fe24727 commit c3edc4d
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 c3edc4d

Please sign in to comment.