1149cccd94
This adds a new client router filter for app paths and redirects so that we correctly hard navigate when a transition for one of this paths is encountered. This fixes the longstanding issue where redirects weren't applied on the client so a redirect that matches a dynamic route as well would transition to the dynamic route on client transition but not on direct visit. Similarly this ensures we hard navigate to app paths from pages even if a page dynamic route matches the path. The specific filter leveraged here is a bloom filter as we can tolerate some false matches (currently targeting an error rate of `2%`) as they just trigger a hard navigation which should be acceptable and this also avoids needing to send an entire manifest with the related paths. We can leverage a manifest for the generated SSG paths as well in a follow-up to fix `fallback: false` routes not being navigated correctly on client-transition in some cases as well. The filter is initially behind an `experimental.clientRouterFilter` flag in `next.config.js` although this is auto-enabled when leveraging app directory to ensure proper transitions. fixes NEXT-609 closes: https://github.com/vercel/next.js/pull/46235 x-ref: [slack thread](https://vercel.slack.com/archives/C035J346QQL/p1677028663246719) x-ref: https://github.com/vercel/next.js/issues/41344 x-ref: https://github.com/vercel/next.js/issues/40062 x-ref: https://github.com/vercel/next.js/issues/37889 x-ref: https://github.com/vercel/next.js/discussions/26426 x-ref: https://github.com/vercel/next.js/issues/35837 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) |
||
---|---|---|
.devcontainer | ||
.github | ||
.husky | ||
.vscode | ||
bench | ||
contributing | ||
docs | ||
errors | ||
examples | ||
packages | ||
scripts | ||
test | ||
.alexignore | ||
.alexrc | ||
.eslintignore | ||
.eslintrc.json | ||
.gitattributes | ||
.gitignore | ||
.npmrc | ||
.prettierignore | ||
.prettierignore_staged | ||
.prettierrc.json | ||
azure-pipelines.yml | ||
CODE_OF_CONDUCT.md | ||
contributing.md | ||
jest.config.js | ||
jest.replay.config.js | ||
lerna.json | ||
license.md | ||
lint-staged.config.js | ||
package.json | ||
plopfile.js | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml | ||
readme.md | ||
release.js | ||
run-tests.js | ||
test-file.txt | ||
tsconfig-tsec.json | ||
tsconfig.json | ||
tsec-exemptions.json | ||
turbo.json | ||
UPGRADING.md | ||
vercel.json |
Next.js
Getting Started
Visit https://nextjs.org/learn to get started with Next.js.
Documentation
Visit https://nextjs.org/docs to view the full documentation.
Who is using Next.js?
Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.
Community
The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.
To chat with other community members you can join the Next.js Discord.
Our Code of Conduct applies to all Next.js community channels.
Contributing
Please see our contributing.md.
Good First Issues
We have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.
Authors
- Tim Neutkens (@timneutkens)
- Naoyuki Kanezawa (@nkzawa)
- Guillermo Rauch (@rauchg)
- Arunoda Susiripala (@arunoda)
- Tony Kovanen (@tonykovanen)
- Dan Zajdband (@impronunciable)
Security
If you believe you have found a security vulnerability in Next.js, we encourage you to responsibly disclose this and not open a public issue. We will investigate all legitimate reports. Email security@vercel.com
to disclose any security vulnerabilities.