Commit graph

1289 commits

Author SHA1 Message Date
Raul Melo
a38b5d2f34
docs(middleware): add _next/image to match ignore (#44659)
I copied the middleware example from the docs to ignore a few matches but the optimized images stopped working. I figure that it was missing adding in the Regex of my middleware.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
2023-01-06 18:18:16 +00:00
Balázs Orbán
54ef48f796
docs: clarify default basePath value (#44642)
Closes #43946

## 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: Steven <229881+styfle@users.noreply.github.com>
2023-01-06 17:55:39 +00:00
Steven
3a9e532768
Update mdx docs example to show merging config (#44656)
This PR updates the `@next/mdx` docs example code snippet to show merging config inside next.config.js

Related to comment https://github.com/vercel/next.js/pull/44205#issuecomment-1373714608
2023-01-06 16:31:32 +00:00
Michał Niedziółka
77f40ae9f1
Correct link to full list of Permissions-Policy permissions (#44607)
The current link to specification doesn't have most of the policies,
which are spread across multiple different documents. I have changed the
link to [w3c Policy Controlled
Features](https://github.com/w3c/webappsec-permissions-policy/blob/main/features.md),
which contains every feature and its status.
<!--
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 that you're making:
-->

## 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

- [x] 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-01-05 13:48:49 -08:00
Christian Riedel
b451a7ee8a
[docs/bugfix] fix code example for "Prefixing the Default Locale" - NEXT_LOCALE cookie usage (#44587)
For this trivial bug(fix) I did not create an issue prior.

The example code changed with #40728 for the "Prefixing the Default Locale" section in the docs has a minor bug, where the NEXT_LOCALE cookie is grabbed and stringified instead of using the value property. This results in `"[object Object]"` and an endless redirection circle.

https://nextjs.org/docs/advanced-features/i18n-routing#prefixing-the-default-locale

## 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-01-05 17:39:25 +00:00
Lee Robinson
ef2672d6c2
Remove old links in docs. (#44580)
Reviewed these and did not find them as relevant anymore.
2023-01-05 02:29:36 +00:00
Shu Uesugi
c5453453ac
Improve modularized imports docs and add config options to example (#44560)
This PR improves the [Modularize Imports](https://nextjs.org/docs/advanced-features/compiler#modularize-imports) section of Next.js Compiler docs as well as [the `modularize-imports` example](https://github.com/vercel/next.js/tree/canary/examples/modularize-imports). They were originally added in [this PR](https://github.com/vercel/next.js/pull/34969).

- Link to [the `modularize-imports` example](https://github.com/vercel/next.js/tree/canary/examples/modularize-imports) was missing from the docs.
- Clarified some explanations and reorganized the content so it's easier to understand.
- Added docs for `skipDefaultConversion`.
- Added docs for `preventFullImport`.
- Illustrated how to use `kebabCase` and `skipDefaultConversion` on the [the `modularize-imports` example](https://github.com/vercel/next.js/tree/canary/examples/modularize-imports).

## 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-01-04 21:39:38 +00:00
Delba de Oliveira
b5e535539f
Docs: Update next/font to @next/font (#44573)
Make the `next/font` naming consistent in the docs.
2023-01-04 19:37:02 +00:00
JJ Kasper
a25d800f3f
Update config-shared docs link (#44547)
Closes: https://github.com/vercel/next.js/issues/44542

## 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-01-03 15:16:09 -08:00
Abir Taheer
0549a46632
Update TypeScript API Route example (#44517)
The existing example causes issues with eslint's `eslintimport/no-anonymous-default-export` rule that come pre-enabled with `create-next-app`.

Added a name to the api handler function before setting it as the default export.



## 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 <22380829+ijjk@users.noreply.github.com>
2023-01-03 20:03:44 +00:00
Shu Uesugi
b6530bb35c
Add module transpilation docs (#44518)
Module transpilation docs were missing from the [compilers documentation](https://nextjs.org/docs/advanced-features/compiler). The text was mostly copied from the [Beta docs](https://beta.nextjs.org/docs/api-reference/next.config.js#transpilepackages).
2023-01-03 09:29:24 +00:00
IDrumsey
fd018fd6cb
Fix link to next-image-to-legacy-image codemod (#44471)
For the upgrade guide for 12 to 13, there's a link pointing to the next-image-to-legacy-image, but the fragment link isn't correct. See [this](https://nextjs.org/docs/upgrading#image-component:~:text=next%2Dimage%2Dto%2Dlegacy%2Dimage%3A) which links to `#rename-instances-of-nextimage` which doesn't look like it goes anywhere.



## 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)


**Do I need to run the `pnpm build && pnpm lint` for this?**
2022-12-31 21:15:43 +00:00
Lee Robinson
f8647a30e3
Update Turbopack docs. (#44468) 2022-12-31 19:14:02 +00:00
france1 [ARCH]
3e1a5bd69a
uses spelling (#44399)
use => uses
2022-12-30 21:26:25 +00:00
Lee Robinson
bd60e31ac0
Update next/head docs. (#44454)
`<meta name="viewport" content="initial-scale=1.0, width=device-width" />` is added by default in `pages`.
2022-12-30 20:18:06 +00:00
조계진
1addb78a49
Update custom-app.md (#44351)
According to [Upgrade Guide](https://nextjs.org/docs/upgrading#remove-supercomponentdidcatch-from-pages_appjs), `componentDidCatch` has been deprecated and is no longer needed. So I propose that this line get deleted in [Custom App](https://nextjs.org/docs/advanced-features/custom-app) of docs.



## 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)
2022-12-27 00:45:10 +00:00
Shu Uesugi
f0aa10b216
Remove experimental for modularizeImports from docs and example (#44311)
When `modularizeImports` was moved out of experiimental [on this PR](https://github.com/vercel/next.js/pull/44240), `docs` and `examples` were not updated.

- Update `modularize-imports` example by removing `experimental` from `next.config.js`, as it's currently failing when deployed
- For docs: https://nextjs.org/docs/advanced-features/compiler#modularize-imports
  - Move `Modularize Imports` section outside of `Experimental Features` section 
  - Remove `experimental` from code snippets
  - Added to version history, just like when SWC Minifier became stable.

## 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)
2022-12-23 20:46:18 +00:00
Tim Neutkens
9ee4c0cdf1
Enable allowMiddlewareResponseBody by default (#44224)
Follow-up to #44195


## 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)
2022-12-21 18:40:58 +00:00
JJ Kasper
52fb820b41
Add docs for middleware flags (#44235)
x-ref: https://github.com/vercel/next.js/pull/44195

## 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)
2022-12-21 17:54:15 +00:00
Long Zheng
2f79baf94b
Update disabling-http-keep-alive.md for server-side only (#43374)
fixes #43354

It is not possible to specify an `agent` on a single `fetch()` call since the types for `fetch` come from TypeScript where `agent` is not supported as an option.
2022-12-19 22:54:12 +00:00
Jiachi Liu
6827b586f0
docs: update next/dynamic docs (#44067)
## Documentation / Examples

- [x] 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)
2022-12-19 13:38:30 -08:00
Didi Keke
ae5502eaaf
docs: Add missing type to import statement (#44111)
<!--
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 that you're making:
-->

## 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

- [x] 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: JJ Kasper <jj@jjsweb.site>
2022-12-19 10:46:06 -08:00
Harry Manchanda
ac1950d66e
Docs: Update deployment.md with Firebase, Amplify and Cloudflare (#44092)
This proposes updates based on New Cloud Services that are supporting Next.js.

1. Cloudflare Pages and Firebase are not Static Only Anymore so moved them to respective sections
2. Added AWS Amplify

**Please merge this open source contribution if this seems valid to you. 🙏** 



## 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: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-12-17 15:26:29 +00:00
Hannes Bornö
e57edff969
docs: Add explanation about font-display (#44001)
Add explanation and recommendation of `font-display`.

## 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: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-12-16 06:58:08 +00:00
Damien Simonin Feugas
35f1a3501a
feat: enables 'edge' as a possible runtime for API routes (#44045) 2022-12-15 10:08:03 +01:00
Adam Trager
7c1ac89be9
not ie 11 is dead (#44029)
`not ie 11` is now included in `dead` by browserslist: https://browsersl.ist/#q=defaults%2C+not+ie+11%2C+not+dead

## 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)
2022-12-14 15:39:48 +00:00
Girish Patil
241635701b
docs: fix wording (#44020)
## 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)
2022-12-14 14:42:45 +00:00
JJ Kasper
7b84d63edb
Add docs for missing support on custom routes (#44007)
x-ref: https://github.com/vercel/next.js/pull/42660

## 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)
2022-12-13 18:42:08 +00:00
Steven
297459d534
Update no-img-element lint rule (#43982)
This updates the `no-img-element` lint rule to explain the trade-offs of enabling or disabling Image Optimization.
2022-12-13 01:50:59 +00:00
AZM
6c1dd229d7
Update compiler.md (#43872)
The sentence is very confusing. Excessive/invalid usage of English grammar



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] 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
- [x] 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

- [x] 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: Steven <229881+styfle@users.noreply.github.com>
2022-12-10 15:38:43 +00:00
Harang
d4a8edf771
docs(migrating): fix broken react-router link (#43843)
<!--
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 that you're making:
-->

Fix broken link in migrating/from-react-router.md
- https://nextjs.org/docs/migrating/from-react-router#code-splitting
- https://nextjs.org/docs/migrating/from-react-router#scroll-restoration

The current link is shown as 404 because it is redirected to the
[document in react-router v6](https://reactrouter.com/en/main).

## 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

- [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)
2022-12-08 10:28:36 -08:00
Soonwoo Hong
0bd3422b6c
docs: Add notes about NEXT_MANUAL_SIG_HANDLE (#43686)
It seems that setting `NEXT_MANUAL_SIG_HANDLE` in `.env` file is not working, so I added some notes.

## 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)
2022-12-04 22:03:19 +00:00
Steven
70d89bc869
Improve docs for URL Imports (#43615)
This improves the examples and ensures the config at the beginning will work for each of the examples below.
2022-12-02 01:47:59 +00:00
Amy Burns
4ca12bd544
adding note that edge api routes are not supported with ISR (#43572)
## 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: JJ Kasper <jj@jjsweb.site>
2022-12-01 11:36:18 -08:00
Thai Pangsakulyanont
860390167a
Clarify that publicRuntimeConfig and serverRuntimeConfig do not work with Output File Tracing (#43443)
The **Output File Tracing** page mentioned that `publicRuntimeConfig`
and `serverRuntimeConfig` are now legacy and does not work with Output
File Tracing (they are _inlined at build-time_ instead of being set at
runtime, the way it is supposed to work).

<img width="710" alt="image"
src="https://user-images.githubusercontent.com/193136/204200235-e7570c64-b760-48a8-bd72-46ed27e82363.png">

However, the Runtime Config page itself does not mention this at all.
This led me into a wrong path for a while.

## 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: Steven <steven@ceriously.com>
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2022-11-30 09:41:07 -05:00
Matthew Heath
79f081994b
Add yarn berry dependency upgrade example for Next 12 to 13 upgrade documentation. (#43472)
This PR adds an example `yarn up` command to bump the relevant dependencies when using yarn berry for the Next 12 to Next 13 upgrade. One thing to possibly note is that `yarn up` is not scoped to a single workspace like `yarn upgrade` in classic - to get around this when in multiple workspaces, the `-i/--interactive` flag can be passed.

**Update** - can upgrade dependencies in both yarn classic/berry using `yarn add ...@latest`, this may be more straight forward than having two separate commands.

## 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)
2022-11-29 17:46:44 +00:00
Alan Toa
524f99221d
docs: update known Safari bug (#43513)
# Why 
hey, teams!  
since Safari `v16` is supported [resolution media
query](https://developer.apple.com/documentation/safari-release-notes/safari-16-release-notes),
so this before docs the `@media not all and (min-resolution: 0.001dpcm)`
media query will not work on Safari latest version.


![image](https://user-images.githubusercontent.com/37520667/204539236-a6206146-3519-45ab-b05e-dfb5481551ec.png)

so I update the docs for `next/image` [Known Browser
Bugs](https://nextjs.org/docs/api-reference/next/image#known-browser-bugs),
hope this can help developers.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`

Co-authored-by: Steven <steven@ceriously.com>
2022-11-29 11:21:49 -05:00
Lee Robinson
9159a6e737
Add link back to font video in Font docs. (#43440)
This has been working well in the beta docs, testing on stable docs before we consider doing this with more pages in a more structured way.
2022-11-29 10:17:25 +00:00
Jan Kaifer
c4b6bb8521
Add ref forwarding for next/image (#43193)
Add ref forwarding for next/image with integration test


- fixes https://github.com/vercel/next.js/discussions/42885
- fixes https://github.com/vercel/next.js/issues/18398 (this one was closed with `onLoadingComplete`)

## Feature

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Documentation added


Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2022-11-25 15:08:50 +00:00
Jo Liss
b8c193bb58
docs: Add default browserslist configuration as a starting point (#43260)
This addition helps users figure out that this is the kind of expression they need to put in their `package.json`, and it provides the Next.js defaults to use as a starting point. (I was initially confused and thought the default configuration would just be "defaults".)

The list was pulled from `MODERN_BROWSERSLIST_TARGET` in [packages/next/shared/lib/constants.ts](28454c6ddb/packages/next/shared/lib/constants.ts (L56-L62)).



## 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)
2022-11-23 02:29:43 +00:00
ADTC
4196822b9c
Add a note about the auto-created empty directory (#43219)
It isn't clear whether the `create` step needs to be run inside an empty directory (avoiding conflicts with existing content in the current working directory), or whether it can be run in a directory with existing contents, and its output would be placed in an empty directory automatically created from the project name.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## 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)
2022-11-22 14:11:55 +00:00
Michał Niedziółka
3e8c6f45be
Add missing quote in next/script example (#43196)
It looks like a simple typo.
2022-11-21 19:47:49 +00:00
AZM
a3e37e325e
Updated typo in the documentation (#43160)
It's is confusing for the first time readers and probably wrong!



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Errors have a helpful link attached, see `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`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `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)


Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2022-11-21 13:50:17 +00:00
Lee Robinson
1fd00899c7
Remove unneeded async in docs. (#43161)
https://github.com/vercel/feedback/issues/23545
2022-11-21 03:45:15 +00:00
JJ Kasper
1fa7114a01
Add note in next/link docs about anchor props (#43064)
This ensures we document with the new default `next/link` behavior that
`anchor` properties can be passed as well.

## Documentation / Examples

- [x] 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)
2022-11-18 09:48:10 -08:00
Hannes Bornö
0a2ae766a8
docs: Add examples of using multiple weights and styles (#43031)
Add examples of using multiple weights and styles for google and local fonts. Although it's in the [API reference](https://nextjs.org/docs/api-reference/next/font) it's probably a good idea to have examples since it's a common use case.

Also added subets to google font examples to make them more 'copayable'.

cc @leerob 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## 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)
2022-11-17 16:59:03 +00:00
JJ Kasper
ec07e30985
Document regions config for experimental-edge (#43009)
This ensures we document the regions config for `experimental-edge`. 

x-ref: [slack
thread](https://vercel.slack.com/archives/C0289CGVAR2/p1668624228564539)
x-ref: https://github.com/vercel/next.js/pull/40881

## 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)
2022-11-16 13:43:19 -08:00
Zeki Can Ekşi
47c1019666
typo (#42968)
just a small typo
2022-11-15 22:16:30 +00:00
Lee Robinson
ad61e84101
Update SFCC example to use TypeScript + @next/font (#42865)
This is now ready for review.

Co-authored-by: Hassan El Mghari <hassan4709@gmail.com>
2022-11-14 09:46:31 -06:00
Damien Simonin Feugas
9faba368bd
docs(edge-api-routes): fixes example (#42903)
## 📖 What's in there?

The last example on the documentation page for [Edge Api routes](https://nextjs.org/docs/api-routes/edge-api-routes) is wrong since next@13 breaking change on cookie handling.
While [middleware page](https://nextjs.org/docs/advanced-features/middleware#using-cookies) is updated, this one was left off.
2022-11-14 15:36:03 +00:00