Skip to content

Commit

Permalink
Fix broken HMR (vercel/next.js#30491)
Browse files Browse the repository at this point in the history
  • Loading branch information
rinti committed Jan 4, 2022
1 parent 346cb1c commit 2dfa892
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Fix: Make Next.js hmr work again, it broke in Next 12 (Andreas Bernacca)

## 8.6.0 (2022.01.01)

- New: Add guide for publishing storybook (Martin Sandström)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ server {
proxy_pass http://host.docker.internal:{{cookiecutter.nextjs_port}};
}

location /_next/webpack-hmr {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://host.docker.internal:{{cookiecutter.nextjs_port}}/_next/webpack-hmr;
}

location /_util {
proxy_set_header Host $host:{{cookiecutter.docker_web_port}};
proxy_set_header X-Real-IP $remote_addr;
Expand Down

0 comments on commit 2dfa892

Please sign in to comment.