This ensures API routes are not available under the locale path since API routes don't need to be localized and we don't provide the locale to the API in any way currently so the user wouldn't be aware if the localized API route was visited instead of the non-localized.
Fixes: https://github.com/vercel/next.js/issues/25790
## Bug
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
Fixes#19862
Avoid executing `webpack` property on `loadableGenerated` of loadable component compiled from `next/dynamic` when `require.resolveWeak` is unavailable due to jest runtime missing `require.resolveWeak`.
## Bug
- [x] Related issues linked using `fixes #number`
- [x] unit tests added
This fixes non-stop reloading when visiting `_error` directly in development caused by the `statusCode` being 200 unexpectedly while HMR returns the page as `invalid` which triggers `on-demand-entries` to reload the page.
## Bug
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
Fixes: https://github.com/vercel/next.js/issues/8036
x-ref: https://github.com/vercel/next.js/pull/8033
This makes sure we don't attempt flushing cache info to disk for `getStaticProps` `redirect` items with `revalidate`
Fixes: https://github.com/vercel/next.js/issues/20816
## Bug
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
* Add link to live demo already hosted
To make it easier for people to simply see the live example without having to deploy a whole new project
* update link
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Fixes#26547
## Bug
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
## Documentation / Examples
- [ ] Make sure the linting passes
## Documentation / Examples
- [X] Make sure the linting passes
This PR updates the with-loading example to follow the documentation of router events for next 11
This adds a comment to the generated `next-env.d.ts` to mention it should not be edited pointing to the documentation which contains an example of adding custom types separately.
x-ref: https://github.com/vercel/next.js/issues/26560
## Documentation / Examples
- [x] Make sure the linting passes
Partially solves #26539 by adding back the log output when a config file is used
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
## Documentation / Examples
- [ ] Make sure the linting passes
Currently, there is only a `hashChangeStart` and subsequent `hashChangeComplete` event and no props update (which would be used to get translations, etc.).
Happy for any feedback
fixes#23467
## Bug
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
## Documentation / Examples
- [ ] Make sure the linting passes
This ensures we don't recommend editing the `next-env` file since we need to be able to tweak it to accept future types we add in Next.js
## Documentation / Examples
- [x] Make sure the linting passes
Closes: https://github.com/vercel/next.js/issues/26533
This strongly types `Router.events.on` and `Router.events.off`. Previously the event type was `string` but now it's `'routeChangeStart' | 'beforeHistoryChange' | 'routeChangeComplete' | 'routeChangeError' | 'hashChangeStart' | 'hashChangeComplete'`
## Bug
- ~[ ] Related issues linked using `fixes #number`~
- [x] Integration tests added
Closes#25679Closes#23753Closes#15497
This Pull Request adds [Alex](https://alexjs.com/) to our documentation. It catches insensitive, inconsiderate writing.
The original PR (https://github.com/vercel/next.js/pull/25821) is too large so I have decided to break it down into smaller PRs. This PR is the first part. Then I will continue to add the rest of the documentation in smaller PRs.
## More Information on Alex:
https://alexjs.com/https://github.com/get-alex/alex
## Documentation / Examples
- [x] Make sure the linting passes
Fixes#22329
## Bug
- [x] Related issues linked using fixes#22329
- [x] Integration tests added
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
## Documentation / Examples
- [ ] Make sure the linting passes
Without `module.exports`, the provided code won't work if just pasted into `next.config.js`
## Documentation / Examples
- [x] Make sure the linting passes
## Documentation / Examples
- [x] Make sure the linting passes
Fixes#26436
As mention in #25854 `with-webassembly` example doesn't work anymore after switching to webpack 5.
This PR adds webpack experimental configuration.
This adds a note to the router doc explaining that page state is not reset by default when updating the URL but staying on the same page as this has come up in a few issues.
## Documentation / Examples
- [x] Make sure the linting passes
x-ref: https://github.com/vercel/next.js/issues/26270
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
## Documentation / Examples
- [x] Make sure the linting passes
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
## Documentation / Examples
- [ ] Make sure the linting passes