Commit graph

1397 commits

Author SHA1 Message Date
Alberto Vilches
2343610fdf
fix: wrong link in docs (#49001)
A link to a third-party package in the docs directs you to the wrong page.
2023-05-01 15:28:50 +00:00
Steven
e7c9d3c051
fix: bump minimum Node.js version to 16.8.0 (#48957)
We bumped `undici` fetch which has a minimum version of 16.8.0 so we need to make sure `next` and `create-next-app` also have the same minimum version.

Since 14.x reaches End-of-Life on [2023-04-30](https://github.com/nodejs/Release), we can drop support for 14 in the next release.

See also:

- Related to #48870
- Related #48941
2023-04-28 15:07:54 +00:00
Jan Kaifer
cc2bcece63
Start recommending gRPC with otel (#48915) 2023-04-28 11:43:28 +00:00
JTaylor0196
f7baa56792
update example Deploy button URLs (#48842)
### What?
Updates Deploy button URLs for all listed examples here:
https://github.com/vercel/next.js/tree/canary/examples

### Why?
The Deploy URLs are currently broken and result in a failed clone
attempt on Vercel.

### How?
The URLs have been changed from https://vercel.com/new/git/external?… to
-> https://vercel.com/new/clone?…
(Last updated
[here](8eaabe2fb0)
in 2021)
2023-04-26 13:31:44 -04:00
Martin Wahlberg
c390c1662b
Add missing word to getStaticProps documentation (#48854)
### What?
Added missing `that` to documentation for getStaticProps

### Why?
This change fixes grammar.

### How?
Updated the text.
2023-04-26 14:02:53 +00:00
Jan Kaifer
db764c35e6
Add support for async instrumentation register (#48575) 2023-04-24 11:43:50 +00:00
Chris
2679ab672d
Update naming for Next.js Analytics (#48618)
Updates the name of Next.js Analytics to Next.js Speed Insights

closes ALY-579

---------

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-04-24 12:14:45 +02:00
Afonso Jorge Ramos
2e99645b6c
docs: update Image props (#48726)
Hey! Hope this can help anyone dealing with this in the future.

I'm also using the `TinaMarkdown` provider to generate my MDX and one of the things that I've found helpful so that the image was better handled in the browser was to set position to `undefined`, as it was the only way to unset it from `absolute`, which was affecting the visual aspect of the page.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-04-23 20:28:03 +00:00
Jan Kaifer
82a01c11a7
Fix TYPO in otel docs (#48623)
<!-- 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-04-20 11:30:40 +00:00
Ryo
9c0a8ce730
Docs: Unify note formatting (#48417)
<!-- 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 #

-->

closes #48416 

### What?

Standardize the "Note" format in the Next.js documentation for improved
consistency and readability.

### Why?

There are currently four different variations of "Note" formatting in
the documentation.
Standardizing to a single format will improve the overall experience for
users.

### How?

Update all instances of "Note" in the documentation to follow the most
common format, `**Note**:` (used in 27 files).
This will involve updating the following variations:

- `Note` (12 files)
- `Note:` (20 files)
- `**Note:**` (21 files)

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-04-19 20:21:28 +00:00
Toru Kobayashi
7b6e336bc5
docs: fix minimum Node.js version to 14.18.0 (#48545)
fixes #42729

According to #42729, the minimum Node.js version of Next is `14.18.0`,
but some docs say `14.6.0`, and it's error-prone.
https://github.com/vercel/next.js/issues/42729#issuecomment-1309947579
pointed out it's a bug rather than wrong documentation.

But Node v14 is going to be EOF this month, so Next will update the
minimum version in the next major release.
https://github.com/nodejs/release#release-schedule

So I feel it's enough to only fix the documentation rather than fixing
the implementation to work with 14.6.0 as a temporary fix.


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

-->

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-04-19 15:16:37 +00:00
Chris McGrath
a9e4b795d7
typo (#48495)
<!-- 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-04-18 02:39:15 +00:00
Rodrigo Feijao
3aca97b410
Update instrumentation.md (#48394)
There is a typo on `export const` where it should be `export function`
2023-04-14 19:06:21 +02:00
Jan Kaifer
79f4e11034
Fix grammar and typos in OTEL docs (#48235)
I ran a grammar check on OTEL docs to get any remaining issues that
spell check didn't fix.

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-04-13 21:21:06 -07:00
Mohit Yadav
c1991c6bae
docs: fix grammar for dynamic routes catch-all explanation and give better examples (#48181)
### Why?

Making the explanation more obvious because it took quite a while for me
to figure out the difference between catch-all and optional catch-all,
and I think others may feel the same way too.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-04-13 21:12:46 -07:00
Jan Kaifer
89366ff44c
Add information about deploy to open telemetry docs (#48241)
Added information on how to deploy with OTEL.

- mentioned that `@vercel/otel` works on Vercel and when self-hosted
- added links to Vercel docs
- added links into OTEL docs for self-hosted
- Added information about custom exporter

Questions:

- should we mention Datadog, NewRelic and others as an examples of
custom exporters?
  - https://docs.datadoghq.com/opentelemetry/
-
https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/opentelemetry-legacy-new-relic-exporters/
2023-04-12 14:45:46 +00:00
apeltop
8bacad921b
Fix typo in script.md (#48225)
occuring -> occurring

I hope it helps.

<!-- 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-04-11 13:26:23 +00:00
Jan Kaifer
af12a94a28
Docs: Describe how to manually configure open telemetry (#48071)
It's currently not clear that `@vercel/otel` is just a simple wrapper
when you are trying things out. So I added an excellent example of how
to instrument create an OpenTelemetry setup.

The only FUD I have here is that people won't skip that `Manual
OpenTelemetry setup` and try to understand it. But I try to describe
this at the beginning of that section.

I'll also try to update `@vercel/otel` readme to be more transparent on
what it does.
2023-04-11 10:59:00 +00:00
Chandrajeet Maurya
536b4dca8c
Update deployment.md (#48062)
Since the code above is referring to `package.json` it should be `npm
run build` and `npm run start` instead of running `next build` and `next
start` directly

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

-->

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-04-07 08:38:59 -07:00
Steven
690208b11f
fix: show error when "next start" is used with "output" config (#47989)
fix #47334
fix NEXT-861
2023-04-06 17:28:27 -07:00
Jan Kaifer
e35710f71f
Recommend @opentelemetry/api instead of @vercel/otel reexport (#48013)
- remove vscode folder from example
- recommend `@poentelemetry/api` over `@vercel/otel`

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

-->

fix NEXT-959
2023-04-06 14:17:47 +02:00
Jan Kaifer
dd959251e6
Docs: Improve Open Telemetry documentation (#47955)
- Removed duplicate information
- Add links into official docs to explain `http.*` attributes
- Properly explain what `next.page` means.
fix NEXT-945

---------

Co-authored-by: Lee Robinson <me@leerob.io>
2023-04-06 11:41:19 +00:00
Gustavo Steinmetz
9df4e0614e
Update Local Images Example to Use Assets Folder (#47878)
This pull request updates the Local Images example in the Next.js
documentation to use an ``assets`` folder inside the ``src`` directory
instead of the ``public`` folder. The changes are made to emphasize the
recommended practice of organizing and importing static assets when
using the Next.js ``Image`` component.

The previous example could cause confusion as it suggested importing
images from the ``public`` folder, which is generally used for static
files that can be accessed directly via a URL. However, when using the
Next.js ``Image`` component, it is recommended to import images as
modules and store them in a folder like ``assets`` inside the ``src``
directory. This approach allows the Image component to optimize images
and prevent Cumulative Layout Shift while loading.

This PR changes the image import statements as the example below:

```jsx
import profilePic from '@/assets/me.png';
```

These changes aim to provide clearer guidance on how to handle local
images. To avoid misunderstandings while the developer follows the
documentation.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-04-05 04:10:31 +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
Jan Kaifer
a3acbf4f55
Add documentation on OTEL support (#47194)
Added docs that mention:
- important code-snippets from example
- links to official OTEL docs
- document NEXT_VERBOSE_OTEL
- explain what we provide out of the box
- what we don’t
- explain how you can add tracing yourself
- explain how instrumentation.js works
- it can be used for different types of instrumentation that don't use
OTEL. It's just a hook called when starting up a new node environment.

- list of all spans we instrument by default
 
fix NEXT-799 ([link](https://linear.app/vercel/issue/NEXT-799))

---------

Co-authored-by: S3Prototype <liuqahs15@gmail.com>
2023-04-04 14:24:46 +00:00
HarshaVardhanReddyDuvvuru
217fbbfd39
[docs] Update getting-started.md with New react docs link (#47841)
Replaced the old React Docs Link with new one




Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-04-03 07:43:34 +00:00
Vishal Jagtap
c8a5bd5eba
Update react-strict-mode.md (#47780)
Updated the old react doc link
2023-04-01 21:34:13 +00:00
Vishal Jagtap
75c76ea772
Update error-handling.md (#47779)
Updated the react error boundary doc link. old one is depricated

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

-->

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-04-01 14:15:02 -07:00
Javi Velasco
2adc1f6c54
Document node.js APIs for Edge Runtime (#47760) 2023-03-31 19:54:22 +00:00
Steven
4c60b7b6ae
feat: bump minimum ts version to 4.5.2 (#47712)
Fixes an issue with newer app directory usage:

```
Failed to compile.
../../node_modules/next/dist/server/future/route-handlers/app-route-route-handler.d.ts:11:15
Type error: ',' expected.
```

---------
2023-03-31 11:37:09 -07:00
Hofer Ivan
9ab6ca5d5f
chore(docs): add typesafe-i18n as a new i18n option (#47315)
<!-- 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-31 11:28:28 -07:00
Jay
247ea65edb
Linking to SST Next.js tutorial. (#47752)
Updating the SST link to a Next.js tutorial: https://docs.sst.dev/start/nextjs
2023-03-31 17:13:31 +00:00
Insik-Han
47152638d4
Replace AWS Serverless to SST in Serverless (#47725)
AWS Serverless(a.k.a Serverless Next.js) is not suitable for versions of
Next.js 12 or higher. As an alternative, I recommend SST.

<!-- 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-30 21:45:05 -05: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
Balázs Orbán
cbb8486afa
docs: clarify returning response in Middleware (#47696)
I noticed that the wording was still suggesting that you needed to
"enable" this, but since
[`13.1`](https://nextjs.org/blog/next-13-1#nextjs-advanced-middleware),
`experimental.allowMiddlewareResponseBody` is not needed anymore.

Ref: #44224
2023-03-30 09:13:14 -07:00
isaackatayev
e9085efe47
Grammar fix (#47600)
<!-- 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 #

-->
Change are -> is in docs (check commits).

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-03-29 16:43:26 -07:00
Max Gudkov
9d9bd8be15
Fix typo (#47634) 2023-03-28 23:08:40 +00:00
Karl Horky
45e2c1e064
Switch to ESM Jest config in docs (#42144)
Thanks again for Next.js 13! Finding a bunch of new ways to improve things 🙌 

Just a quick PR to switch the Jest configuration file with `next/jest` to ESM to eliminate another instance of CommonJS.

ESM requires a `.js` extension on the import.

An alternative would be to switch to a TypeScript config file (`jest.config.ts`) which would (I am guessing) not require this file extension (but still allow switching to an ESM-style `import` syntax).

New version in the diff:

```js
// jest.config.mjs
import nextJest from 'next/jest.js'

const createJestConfig = nextJest({
  // Provide the path to your Next.js app to load next.config.js and .env files in your test environment
  dir: './',
})

// Add any custom config to be passed to Jest
/** @type {import('jest').Config} */
const config = {
  // Add more setup options before each test is run
  // setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
  // if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work
  moduleDirectories: ['node_modules', '<rootDir>/'],
  testEnvironment: 'jest-environment-jsdom',
}

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
export default createJestConfig(config)
```

## 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
- [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`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-03-28 00:10:58 +00:00
Lachlan Campbell
461617bc70
docs(image): Update browser bugs section for Safari 16.4 release (#47577)
### What?

Safari 16.4, released today, fixed a known browser bug [around lazy-loading images](https://webkit.org/blog/13966/webkit-features-in-safari-16-4/#:~:text=Now%20in%20Safari%2016.4%2C%20a%20gray%20line%20no%20longer%20appears%20to%20mark%20the%20space%20where%20a%20lazy%2Dloaded%20image%20will%20appear%20once%20it%E2%80%99s%20been%20loaded.).

### Why?

This bug is mentioned in the docs & the fix has been long-awaited by @styfle & users.

### How?

I've updated the next/image doc with this link.
2023-03-28 00:02:27 +00:00
Donny/강동윤
688d8253da
refactor(relay): Use transform from swc/plugins repository (#47441)
Previously `next-swc` had relay transform inline, but it makes
maintenance harder. So this PR patches next-swc to use relay plugin from
`swc-project/plugins` repository.

Closes WEB-782
Fixes #47239

fix NEXT-883 ([link](https://linear.app/vercel/issue/NEXT-883))
2023-03-27 09:34:09 +02:00
Ken Murphy
836539d083
Docs typo (#47528)
fix: typo
2023-03-25 16:46:17 +00:00
Rodrigo Esteves
c7cbb4aaf8
Update Error Boundaries link to new ReactJS documentation (#47474) 2023-03-24 04:12:33 +00:00
Sean Massa
3d9396020b
clarify warning about edge + ISR support (#47452)
Made two tweaks:

- ~renamed `experimental-edge` to `edge`: do we still need to reference
`experimental-edge`?~
- added "you" for clarity of word flow
2023-03-23 11:55:08 -07:00
Steven
9791d1e608
feat: change next build to emit output with output: export (#47376)
This PR ensures the correct output is emitted during `next build` and
deprecates `next export`.

The `output: export` configuration tells it to emit exported html and
the `distDir: out` configures the output directory.

```js
module.exports = {
  output: 'export',
  distDir: 'out',
}
```

fix NEXT-868 ([link](https://linear.app/vercel/issue/NEXT-868))

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-23 15:40:18 +01:00
Nikhil Swaminathan
db2037134b
Updating the default URL of Amplify Hosting (#47420)
Updating the URL to a place customers can learn about the capabilities available within Amplify (vs the docs).

Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2023-03-23 04:26:25 +00:00
Steven
5eaaa3fbf7
fix: add pretty error for exportPathMap with app dir (#47371)
The `exportPathMap` feature has been unofficially deprecated for a long time since introducing `getStaticPaths()`.

For the `app` dir, the same can be accomplished with `generateStaticParams()`.

This PR adds a pretty error when using `exportPathMap` with `app` and updates documentation to reflect the current status.


fix NEXT-836 ([link](https://linear.app/vercel/issue/NEXT-836))
2023-03-21 22:22:34 +00:00
Alexander Grattan
4942394bd9
fix: update capitalization of ISR doc heading (#47370)
Makes the capitalization for `On-demand Revalidation` correct and consistent with the rest of the page by changing it to `On-Demand Revalidation`. Thanks for this awesome framework!
![nextjs-isr-doc-change](https://user-images.githubusercontent.com/51346343/226716622-c2b77d39-780a-448e-96a7-ed417cdf2353.png)
2023-03-21 19:31:22 +00:00
Lee Robinson
269780cfbf
Add note about Windows Defender (#47298)
https://twitter.com/timneutkens/status/1637504870541320193
2023-03-19 18:01:33 +00:00
Lee Robinson
990f62acde
Improve static export documentation (#47251)
There has been some helpful [discussion on Twitter](https://twitter.com/dan_abramov/status/1636778278882099216) around this page of documentation. I refactored the introduction to make it more clear that you also get to use SPA features when doing a static export, and underscoring the value of being able to deploy/host virtually anywhere with this approach.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-03-17 18:54:54 +00:00
Felipe Saldanha
e49bfeaf47
Update router.md (#47210) 2023-03-17 09:39:31 +00:00