**What's the problem this PR addresses?**
`@next/mdx` adds the webpack loader `@mdx-js/loader` without resolving it to an absolute path
Depends on https://github.com/vercel/next.js/pull/17606
**How did you fix it?**
`require.resolve` the webpack loader before adding it
This PR is a small follow-up to #14705. It saves Next.js users from falling into a [pretty nasty trap](https://github.com/nodejs/node/issues/36620) in which I ended up last Friday. It took more than two days to investigate what was going on, so I hope I'm the last person who’s doing it 😅
Next.js-specific MWE: https://github.com/kachkaev/hanging-response-in-next-via-redirect-plus-compression (needs to be ran locally using Node 14.0.0+).
> <img width="521" alt="Screenshot 2020-12-24 at 20 50 00" src="https://user-images.githubusercontent.com/608862/103105989-a9b8dc00-4629-11eb-9be3-5108755604bf.png">
To reproduce the bug I’m fixing:
1. Pick a large http body size (64 or 128 KB)
1. Check _Call res.end() after res.redirect() in /api/redirect_
1. Navigate to a heavy page or an api handler via redirect
1. Observe that the http response is never finished.
If you set `compress` to `false` in `next.config.js` or pick a small payload size (< `zlib.Z_DEFAULT_CHUNK` after compression), the bug will not be observed. This is explained by the use of `res.on("drain", ...)` [by the `compression` package](3fea81d0ea/index.js (L193-L218)). The package itself is not the reason for an issue though, it seems to be in the Node’s built-in `http` package.
I’m happy to provide more info or GitHub CI to the MWE if needed. I was also thinking of adding some Next.js-specific testing, but could not come up with a compact and clear test plan. Happy to do this if there are any ideas.
cc @botv (author of #14705)
Updates the env documentation to mention `.vercelignore` when using the Vercel CLI. Also clears up parts of the other paragraphs and updates the links as these topics now have dedicated pages in the Vercel docs.
Follow-up to https://github.com/vercel/next.js/pull/20628 this ensures `isReady` is not initially true when the query isn't present but the page is an automatically statically optimized dynamic route
Currently there is no way to add multiple meta tags with the same name attribute to the head of a page. This PR modifies the Head component to allow multiple meta tags with the same name if they have unique keys.
This is important for integrating with certain services like Google Scholar and Swiftype.
Fixes#10183
This PR fixes a bug where `next/babel` would accidentally enable development transforms for a production build (`next build`).
This is tested by the two updated unit tests (which removed a workaround for this bug, and one now properly enables dev transforms).
---
Fixes#18929Fixes#19001
x-ref #19046
x-ref #17032
This PR fixes a bug where we'd accidentally pass-through the user-provided `srcSet` if the image was lazy, just to then replace it when we hydrate.
---
Fixes#19041
This bundles ally.js into Next.js itself to upgrade a dependency they have pinned.
I tried every other major focus trap solution, even those used by some modal libraries, and they all failed.
`ally.js` is the only library that can do it correctly, so we're going to stick with it.
I also removed the `maintain/disabled` as we have a backdrop that would effectively result in the same. This reduces CPU strain.
---
Fixes#19893Fixes#14369Closes#14372
This pull request adjusts our experimental scroll restoration behavior to use `sessionStorage` as opposed to `History#replaceState` to track scroll position.
In addition, **it eliminates a scroll event listener** and only captures when a `pushState` event happens (thereby leaving state that needs snapshotted).
These merely adjusts implementation detail, and is covered by existing tests:
```
test/integration/scroll-back-restoration/
```
---
Fixes#16690Fixes#17073Fixes#20486
Building off [this Slack conversation](https://vercel.slack.com/archives/CGD3XGSD7/p1597329727013900), this PR adds a top-level section to the documentation on authentication patterns.
Please provide any and all comments! A few open thoughts I have:
- ~Should this include code snippets from the related providers or stay very high-level? At what point do we delegate to the examples folder?~ Keep things high level and delegate to examples folder
- ~Should this include any related cards at the bottom?~ Added to the bottom
- ~Should other places in the documentation link back to here?~ Added link from routing
- Should it be a top-level route, or be underneath advanced?
This ensures we render the locale domain on the `href` when using `next/link` previously the provided `href` was stilling being rendered which differed from the resulting `href` that was navigated to.
Fixes: https://github.com/vercel/next.js/issues/20612