Commit graph

462 commits

Author SHA1 Message Date
Delba de Oliveira
98c3076eb4
Docs: Document caching mechanisms (#52514)
This PR document the caching semantics in Next.js, how they interact, and what APIs affect them. We're also taking the opportunity to consolidate terminology, remove duplicate content, and update sections of the docs that relate to caching. 

### Documentation

- [x] Create a new section for caching
- [x] Explain how the different caching mechanisms work
   - [x] Request Memoization (React Cache)
   - [x] Persistent Data Cache 
   - [x] Persistent Full Route Cache 
   - [x] In-memory, client-side Router Cache 
- [x] Document how different APIs affect caching
- [x] Document cache interactions 
- [x] Clean up stale information in the other docs sections
   - [x] Routing Section
      - [x] Move advanced navigation topics from fundamentals to **How Navigation Works** section
      - [x] Rewrite the **How Navigation Works** section
   - [x] Rendering Section
      - [x] Simplify fundamentals page
      - [x] Rewrite the **Static and Dynamic Rendering** pages
      - [ ] ~Create a page to explain how **Client and Server Components** are rendered~. Moved to this PR: https://github.com/vercel/next.js/pull/51579
   - [x] Data fetching section 
      - [x] Consolidate data fetching story for fetching, caching, and revalidating
      - [x] Clarify data fetching story with 3rd party libraries and React `cache`
      - [x] Create **Data Fetching Patterns** page
- [x] Document other related behaviors: 
   - [x] Update information on scroll position for back/forward navigation 
   - [x] Remove the concepts of **soft and hard navigation**
   - [x] Remove the concepts of **static and dynamic data fetching**
   - [x] Use consistent terminology **runtime** 👉🏼  **request time**. Runtime for Edge and Node.js, request time to describe when dynamic stuff happens
   - [x] `generateStaticParams` being able to seed the Full Route Cache
- [x] Polish 💅🏼 

---
### Related PRs:

- Diagrams: https://github.com/vercel/front/pull/24142
- Redirects: https://github.com/vercel/front/pull/24179
2023-07-31 17:03:26 +00:00
Li Ming
16a5aa74d0
feature: Update cases in [Incorrect nesting of HTML tags] (#53282)
It took me much time to debug this issue during my development process, and since the error logs(you can see below) given are not very clear, I hope it will help others who encounter the same problem.

<img width="954" alt="image" src="https://github.com/vercel/next.js/assets/1228449/69fd949e-f396-44e3-833c-8e7bbf080492">

ref: 
- [Are you allowed to nest a link inside of a link?](https://stackoverflow.com/questions/9882916/are-you-allowed-to-nest-a-link-inside-of-a-link)
- [Interactive Content](https://html.spec.whatwg.org/#interactive-content-2)
<img width="1283" alt="image" src="https://github.com/vercel/next.js/assets/1228449/db864080-14fd-45e1-9468-54365c6afddc">


Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-07-28 18:12:15 +00:00
Steven
a0856eb596
chore: update warning message from yarn add sharp to npm i sharp (#53130)
Previously, this warning message assumed the user knew what `yarn` was and had it installed.

This PR changes the warning message to assume the user knows what `npm` is and has it installed, since `npm` ships with the official `node` installation.
2023-07-24 22:33:12 +00:00
Anthony Shew
b89424e461
docs: Add missing closing tag for react hydration error message. (#52607) 2023-07-13 00:22:10 +02:00
Victor Machado
8360ca0332
docs: add CDN optimization as possible hydration error cause (#52489)
At my work, we use Cloudflare as our CDN, and it has various optimization options for the served code including the "Auto Minify" feature that can minify JS, HTML and CSS to reduce download speed. After months of trying to update React to version 18, I have finally found out that the "Auto Minify" was the root cause of the problem, not anything in our code such as invalid tag nesting or printing dates. Because of that, I thought it would be helpful to add CDN as a possible place for investigating hydration errors.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-07-10 16:09:12 +00:00
Lee Robinson
4f8f9ae5b0
docs: Improve hydration mismatch error guide. (#52481) 2023-07-09 20:41:42 -07:00
Lee Robinson
6527d29c8a
docs: Improve some of the error messages pages. (#52271)
Now that we've improved `/messages`
(https://github.com/vercel/next.js/pull/52038), we'd like to start
updating some of the content as well 🙏
2023-07-05 19:22:34 -07:00
Delba de Oliveira
44d1a1cb15
docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00
Delba de Oliveira
18406adf9c
Make sure DevEx can approve docs PRs / Remove Spaces (#51996) 2023-06-29 17:10:53 +00:00
Ty Hopp
65f94baa83
feat: Introduce eslint rule for async client components (#51547)
The [React Server Component RFC on promise support](https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises.md) indicates that [client components cannot be async functions](https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises.md#why-cant-client-components-be-async-functions).

This PR introduces an eslint rule to enforce this.

Fixes #50898
2023-06-26 21:10:24 +00:00
Nick McCurdy
c3c6214c09
Update docs for Google Analytics 4 (#51405)
### What?

Update docs for Google Analytics 4

### Why?

This page doesn't make it clear which script is recommended, and has code that's outdated and erroring.

### How?

Update headings and clean up bad code.
2023-06-23 20:54:52 +00:00
Tyler Lutz
8b507ce45c
Remove extra word in env key error (#51512)
Removes extra word in env-key-not-allowed.md error
2023-06-20 15:23:44 +00:00
Willem-Jaap
0bda6287b6
fix(cli): add all available options to cli commands, format them consistently (#48708)
### What?
Add all available options to cli commands
Consistent formatting for all options

### Why?
Options were not consistent across all commands, some were missing



Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-06-14 02:36:08 +00:00
Yishay Hazan
fe2c0cbc5d
Update fast-refresh-reload.md (#49953)
Full refresh happens when component's name is camelCase instead of PascalCase
2023-06-14 01:45:27 +00:00
Delba de Oliveira
3d41ccb916
Update codeowners (#51250)
Tweak code owners after some testing and feedback. 

- Move the Next.js team up to be optional global code owners (so that everyone can review but are not tagged for review). Global individuals should still be tagged if there are no specific `.vercel.approvers` files in subdirectories.
- Adds @vercel/devex to image files so there's coverage on those files for the docs
- Target specific folder and files for Styfle to get notified
- Deletes some rules in the old GitHub codeowners
2023-06-13 17:47:12 +00:00
Sora Morimoto
0840793abf
Fix all 404 links (#51209)
I found some 404 links in jsdoc, so I used ripgrep to find and fix all the broken links to fix all the other links in this PR.
2023-06-13 14:25:40 +00:00
Michael Novotny
a973ad64d4
Makes codeblock language and filename extensions consistent (#51056)
There was mismatched usage of `js`, `jsx`, `ts`, and `tsx`. Just tried to get them all in sync.
2023-06-12 18:55:08 +00:00
Omar Houmz
1c1ef0ef3f
Update next-image-unconfigured-host.md with correct Remote Patterns Documentation link to new docs (#49750) 2023-06-12 14:05:37 +00:00
Mingjie Jiang
8811c1f3f6
Add appDir-specific guidance for next-router-not-mounted error (#50076)
The error `next-router-not-mounted` can also happen when one tries to use the `next/router` hook inside the app directory. The error page has been updated to reflect that, and migration guides are linked. 

Closes #47038.
2023-06-08 20:08:26 +00:00
Delba de Oliveira
8c2e5bd072
Update codeowners to use Vercel Spaces (#50841)
Move as much of codeowners as possible to use Vercel Spaces. 

1. Makes `@timneutkens @ijjk @shuding @huozhi @feedthejim` global owners
2. Make the `@vercel/next-js` team _optional_ owners of **/docs**,
**/errors**, and **/contributing**, makes team owners of a few packages
as per old config.
3. Make `@vercel/devex` (docs and devrel) owners of **/docs**,
**/errors**, and **/contributing**
4. Make `@vercel/devrel` (devrel only) owners of **/examples**
5. Make `@vercel/web-tooling` owners of specific files and folders (as
per old config)

Leaves @styfle as owner of **image** files on the old config since this
pattern `/**/*image*/** ` can't be used with Vercel Spaces.

Note: We cannot add * or / at the end of files.
[Docs](https://spaces-docs.vercel.sh/docs/code-owners#:~:text=Code%20Owners%20files%20are%20meant%20to%20encourage%20distributed%20ownership%20definitions%20across%20a%20codebase.)
2023-06-08 12:02:18 +02:00
j0hnta
5526ea504c
Update invalid-new-link-with-extra-anchor.md (#50036)
Fix typo
2023-05-21 21:31:39 +00:00
Mark Barton
aaf7fa5d25
Update app-static-to-dynamic-error.md (#50085)
spelling error
2023-05-21 19:38:22 +00:00
Josh Parnham
5451564f36
[docs] Add iOS hydration mismatch details to error page (#43584)
We recently ran into hydration mismatch errors on iOS, which we realised
was due to iOS automatically converting what it thought were phone
numbers into links.

We then found this GitHub issue,
https://github.com/vercel/next.js/issues/38290, and thought it would be
useful to add these details to the documentation page linked from the
next.js error.

---

Example from the linked issue:


![image](https://user-images.githubusercontent.com/712727/204925813-f986e2ca-29c2-4b63-9121-df4c7b00b1d8.png)

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-05-09 12:55:41 +02:00
Sanjaiyan Parthipan
173381a572
Fix error message about preconnect 📝 (#40360) 2023-05-07 00:05:07 +00:00
Steven
39654fd4bb
chore(docs): update next-image-unconfigured-host.md (#49175)
We have reports of users scrolling down the the bottom to copy/paste `domains` configuration, instead of using the safer `remotePatterns` configuration at the top.

This PR collapses the older `domains` configuration behind a details toggle since it is only needed for older versions of Next.js prior to 12.3.0
2023-05-03 22:10:57 +00:00
Philip Nguyen
4973420765
Fix typo in errors/version-staleness.md (#48797) 2023-04-24 20:03:44 +00:00
Wyatt Fry
16a2c64cf5
typo (#48716)
"ran" is conjugated, which cannot be used after the verb "to be", only the infinitive "run" is correct here.
2023-04-23 01:53:33 +00:00
Swarnava Sengupta
a79d1efdd0
[Docs] Update react docs link (#47891)
- This PR fixed the  Documentation link of new react.dev website.
2023-04-04 11:56:03 -07:00
Steven
3f35608fdc
fix: improve error message pages for output: export (#47765)
fix NEXT-928 ([link](https://linear.app/vercel/issue/NEXT-928))
2023-03-31 13:23:51 -07:00
Steven
af49d5098b
chore(docs): update next export to output: 'export' (#47717)
fix NEXT-927 ([link](https://linear.app/vercel/issue/NEXT-927))
2023-03-31 02:04:23 +00:00
Tom
5262594cd7
Add note about req to circular-structure error doc (#47162)
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-03-27 03:44:31 +00:00
Tim Neutkens
29d7a265df
Add warning when deopting page into client rendering entirely (#47531)
### What?

Adds a warning when `useSearchParams` deopts the entire page to
client-side rendering.

When there is no Suspense boundary the entire page becomes client-side
rendered, you can learn more about that here:
https://beta.nextjs.org/docs/api-reference/use-search-params#static-rendering

### Why?

We've seen a few cases where people accidentally deopt the entire page
by calling `useSearchParams` as there was no indicator that this deopt
happened.

### How?

When the full page deopt happens the error is caught by the rendering
code so we warn there.

Closes NEXT-589

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2023-03-26 19:52:30 -07:00
Rich Haines
b036c0b2ec
Update react hydration error message page title (#47499)
This PR update the react hydration error pages title to better reflect the error being solved
2023-03-24 15:08:48 +00:00
Hannes Bornö
cb729c1087
Remove experimental fontLoaders option from next.config.js (#46886)
Currently there's an experimental option in `next.config.js` that lets you define default subset(s) to preload for all your fonts. [docs](https://nextjs.org/docs/basic-features/font-optimization#specifying-a-subset)

Over time we haven't seen much use of this option, and we are defining the subsets in the font function call in all our examples/docs. Imo it would be fine to drop this option.

This PR removes that experimental option. If you happen to use it you'll get a build error with [a link](f67af163cd/errors/google-fonts-missing-subsets.md).

Next step (breaking change for next major) would probably be to remove the preload and subsets properties from `next/font/google` calls, and just have something like [`preloadSubsets´](https://vercel.slack.com/archives/C8EAN8A94/p1674868993169559?thread_ts=1674707555.461809&cid=C8EAN8A94) that is required.
2023-03-13 21:34:43 +00:00
Hannes Bornö
533748d383
next/font refactoring and additional unit tests (#46731)
Currently all helper functions are exported from huge utils files. This
moves the helper functions to their own files, this approach aligns
better with the rest of the codebase.

The unit tests are split up and colocated with the function it tests.
Also added some missing tests.

Plus some overall cleanup, added comments and fixed types.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## 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`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-03-06 17:16:25 -08:00
Michael Novotny
5e112c062e
Updates next/image eslint message to denote that costs may be incurred. (#46640)
Changes ESLint warning message to still encourage usage of `next/image`
for the best experience, but also denoting that optimization could come
with incurred costs.

## Feature

- [x] Documentation added
- [x] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

---------

Co-authored-by: Steven Tey <stevensteel97@gmail.com>
Co-authored-by: Steven <steven@ceriously.com>
2023-03-01 14:28:09 -08:00
Oskar Oldorf
d167ecce47
Documentation: Update link-no-children error page for new link (#46514)
The example still has an `<a>` inside the `<Link>` which was deprecated
with next 13.

Current page: https://nextjs.org/docs/messages/link-no-children

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
-->


## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-03-01 11:01:04 +01:00
Serkan Bektaş
0c0318e75b
Wrong function name (#46546)
The function name was written incorrectly. Property 'rewrites' does not exist on type NextResponse.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## 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`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-28 11:46:50 +00:00
Andy
5dee445ef9
Fix broken link on node-module-in-edge-runtime.md (#46305)
I was notified that this link is broken.

Not sure if I'm missing something, but the Markdown doesn't look right, changed it to be a normal link.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-23 16:01:51 +00:00
Steven
57d2963507
feat: add contentDispositionType config to Image Optimization API (#46254)
Add `contentDispositionType` config to Image Optimization API so the user can configure `inline` vs `attachment`.

This is recommended when `dangerouslyAllowSVG` is enabled but can also be used when its disabled.
2023-02-22 19:56:51 +00:00
Tim Neutkens
08bb2698f5
Update error doc for CSS Modules in third-party deps (#46121)
Fixes NEXT-355



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## 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`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-19 13:39:13 +00:00
Hannes Bornö
bac00ba7d7
@next/font migration warning (#46036)
Print warning with migration instructions if `@next/font` is in deps.

Fixes NEXT-483

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## 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`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

---------

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-02-17 16:39:26 +01:00
Balázs Orbán
c16e28715f
feat: show version staleness in error overlay (#44234)Co-authored-by: Sukka <isukkaw@gmail.com> Co-authored-by: Steven <steven@ceriously.com> Co-authored-by: Hannes Bornö <hannes.borno@vercel.com> Co-authored-by: Hannes Bornö <borno.hannes@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Supersedes #37750 as the overlay has been refactored and moved into the
Next.js package itself.

If it detects an older major version, it will show "outdated". Older
minor shows "out of date". Old canary will show "out of date", with a
different message. Matching latest canary or latest will show "up to
date". It will show nothing if we could not detect the versions due to
some error.

<details>
<summary>States: Fresh, stale, outdated</summary>

Fresh:

![image](https://user-images.githubusercontent.com/18369201/208972067-8f2bd8d5-bb92-440a-a3aa-0685b18b4871.png)


Stale:

![image](https://user-images.githubusercontent.com/18369201/208971789-baec0b90-718a-4cdc-bb15-ed23ce5efcbc.png)


Outdated:

![image](https://user-images.githubusercontent.com/18369201/208972153-923ab865-e0f7-405d-9411-45ad1f545d0e.png)

</details>

Fixes NEXT-316

---------

Co-authored-by: Sukka <isukkaw@gmail.com>
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Hannes Bornö <hannes.borno@vercel.com>
Co-authored-by: Hannes Bornö <borno.hannes@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 16:18:28 +01:00
Hannes Bornö
435eca3fc5
Add next/font import (#45891)
Enables using `next/font` by adding `@next/font` as a dependency and
reexporting its loaders.

Always generates the `font-loader-manifest` as we can't know beforehand
if the user intends to use `next/font` or not.

Also adds telemetry for `next/font` usage.

The tests are updated to use `next/font`. But `@next/font` is tested in
`test/e2e/next-font/index.test.ts` and `test/e2e/app-dir/next-font` as
well to ensure it doesn't break.

Fixes NEXT-351

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## 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`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-16 15:33:39 +01:00
Wyatt Johnson
74ca99c866
Server Router Improvements (#45716)
This adds updated matching handle for the server to separate out the matching and executing of different route types e.g. page routes, API routes, and app routes. 

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-02-15 00:16:45 +00:00
Jan Kaifer
90bfb762c8
Update app-static-to-dynamic-error.md (#45704)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## 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`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-08 16:08:35 +00:00
Dawid Czesak
e91f2b0309
Update no-img-element.md (#45701) 2023-02-08 14:11:39 +00:00
Sam Denty
d9412b7621
Update react-hydration-error.md (#43671)
This adds a new section about local overrides, as I ran into this error and it took me ages to figure out what was going wrong

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-02-07 22:38:03 +00:00
Andrés Bedoya (SrHart)
91e0be1c3e
Update no-html-link-for-pages.md (#45247)
Update no-html-link-for-pages.md based on the new link API https://nextjs.org/docs/api-reference/next/link
2023-01-25 03:17:09 +00:00
ilyasmez
57d0e77f78
chore: fix invalid-new-link error typo (#45157) 2023-01-23 17:06:50 -08:00