Jiwon Choi and GitHub
c469404824
improve no-img-element lint error message ( #72410 )
...
### Why?
To customize Image Optimation, the user can use a custom loader, but
that information was out from the related lint error message.
Closes NDX-181
2024-11-12 21:48:12 +09:00
691eeae8fb
docs: unify the header deps by removing # ( #72451 )
...
## Description
Follow up #72391 .
I missed some error pages.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-08 11:20:34 -08:00
Delba de Oliveira and GitHub
0b35ddd825
Docs: Move next.config.js API pages under a config folder, fix headings in TS and ESLint config pages ( #72465 )
...
This PR:
- Moves `next.config.js` options under a "config" folder which includes
references for other configuration such as the ESLint plugin. I figure
it would be tidier than having "Next.config.js Options" and "Config" in
the API reference.
- Fixes the issue with the "config" folder not showing up in canary:
https://linear.app/vercel/issue/DOC-3749/bug-figure-out-why-new-config-folder-isnt-showing-up-in-the-canary
- Fixes the indentation issues and missing example header (caused by an
invisible character).
Redirects: https://github.com/vercel/front/pull/38704
2024-11-08 14:48:55 +00:00
74a19b7467
docs: unify the header deps by removing # ( #72391 )
...
## Summary
Remove redundant `#` from [error
pages](https://github.com/vercel/next.js/tree/canary/errors ).
## Description
Follow up #52038 and #72263 .
Updated
[template.txt](https://github.com/vercel/next.js/blob/canary/errors/template.txt )
and clarified the header deps.
Then rewrite as per the template.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-07 08:58:43 +00:00
fbb3a766e7
Update Cloudflare Auto Minify link due to feature deprecation ( #72417 )
...
This PR updates the link for the Cloudflare Auto Minify feature, as it
has been deprecated. Cloudflare now recommends disabling this feature to
avoid potential issues. The link and related references have been
modified to reflect this update and ensure accurate information for
users.
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-07 08:52:56 +00:00
fa8d558154
Docs: Split Getting Started between App and Pages, improve Installation page ( #72178 )
...
Prepare **Getting Started** Section for upcoming changes, and work on
the first page: `Installation`.
Closes:
-
https://linear.app/vercel/issue/DOC-3703/update-how-getting-started-is-handled-in-next-site
-
https://linear.app/vercel/issue/DOC-3694/page-how-to-set-up-a-new-nextjs-project-installation
- https://linear.app/vercel/issue/DOC-3707/create-subsection-for-plugins
- https://linear.app/vercel/issue/DOC-3709/eslint-plugin-api-reference
- https://linear.app/vercel/issue/DOC-3710/typescript-reference-page
### Key Changes:
- Duplicate Getting Started Section between App and Pages Router docs
- Since getting started will vary between the routers, each docs needs
to have their own Getting Started section
- Reorganize folder numbers
**Installation Page**:
- Split app and pages router specific information
- Rename "Installation" to "How to set up a Next.js application" for SEO
- Add setup instructions for **TypeScript**
- Add setup instructions for **ESLint**
- Add setup instructions for **Absolute Imports and Module Path
Aliases**
**Side effects from moving content around**:
- Create a subsection in API Reference called **Configuration**.
- Add ESLint Plugin page, and update it to follow template
- Add TypeScript page, and update it to follow template
- Remove the **Absolute Imports and Module Path Aliases** page, it's
small enough to live under the set up instructions.
---------
Co-authored-by: Rich Haines <[email protected] >
2024-11-06 12:32:05 +00:00
Delba de Oliveira and GitHub
8f99ab20ae
Docs: Remove legacy tags from unstable_cache and unstable_noStore ( #72134 )
...
This was a premature move as the docs made their way into the stable
version. Can't risk these being merged just yet, and they're also not in
canary.
2024-11-06 08:35:52 +00:00
974767e42d
Fix code examples in error page ( #72259 )
...
This PR fixes the code examples in the Next prerender missing suspense
error page
<!-- 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
- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
### Adding or Updating 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: Delba de Oliveira <[email protected] >
2024-11-06 08:16:56 +00:00
ed239c40b5
docs: update error template.txt ( #72263 )
...
## Summary
Update [error
template.txt](https://github.com/vercel/next.js/blob/canary/errors/template.txt )
following #52038 changes.
## Description
1. Remove errorId header
2. Section header is double sharp `##` instead of four sharp `####`
### Adding or Updating Examples
- [x] The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`.
See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-06 08:16:40 +00:00
2d549683a6
docs: change runtime value in example code ( #72274 )
...
## Description
[Invalid Page / API Route
Config](https://nextjs.org/docs/messages/invalid-page-config ) shows some
examples.
However, runtime examples are same `nodejs` runtime.
Then I add `edge` value instead of duplicate value.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-06 08:16:38 +00:00
f8b4b227e1
docs: add filename to code block ( #72275 )
...
## Summary
[Use Code Block
filename](https://nextjs.org/docs/canary/community/contribution-guide#language-and-filename )
instead of comment.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-06 08:07:02 +00:00
aabb04c983
docs: remove -/+ diff marker ( #72278 )
...
## Description
[next-request-in-use-cache error
page](https://nextjs.org/docs/messages/next-request-in-use-cache ) uses
-/+ icons in code block.
However, it doesn't work correctly because it's not diff code block.
Then add highlight instead of that.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-05 07:33:40 +00:00
7b2acfc701
docs: replace let with const ( #72279 )
...
## Description
Replace `let` with `const` in [No async client component error
page](https://nextjs.org/docs/messages/no-async-client-component )
example.
Since in these examples, it doesn't need to be a `let`, as it doesn't do
any reassignment.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-05 07:28:37 +00:00
e5e1cfe4c8
docs: add bash filename=Terminal to code block ( #72281 )
...
## Summary
Add `bash filename="Terminal"` to improve readability.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-05 07:28:23 +00:00
bca3b9e3cd
docs: add missing Useful Links to error pages ( #72282 )
...
## Summary
Add missing `## Useful Links` section header to adapt
[template](https://github.com/vercel/next.js/blob/canary/errors/template.txt ).
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: Delba de Oliveira <[email protected] >
2024-11-05 07:20:03 +00:00
7fe9065917
docs: typo file extension ( #72272 )
...
## Summary
Change [language and
filename](https://nextjs.org/docs/canary/community/contribution-guide#language-and-filename )
for match code block language.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: JJ Kasper <[email protected] >
2024-11-04 23:16:21 +00:00
926752ecfe
docs: add missing before section name ( #72277 )
...
## Summary
Only exist `after` directive at [next-prerender-current-time error
page](https://nextjs.org/docs/messages/next-prerender-current-time ).
Then add `before` section name.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: JJ Kasper <[email protected] >
2024-11-04 23:06:27 +00:00
Delba de Oliveira and GitHub
9bbf1d023c
Docs: Fix css modules page in Pages docs ( #72135 )
...
Re: https://vercel.slack.com/archives/C07BS1WEYAZ/p1730162050697879
2024-11-04 12:23:43 +00:00
b5531e99e5
docs: add missing root directory / to path ( #72118 )
...
## Summary
Add a slash to correct the problem.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: Delba de Oliveira <[email protected] >
2024-10-31 14:06:53 +00:00
2139a141cb
fix typo in doc ( #71600 )
...
<!-- 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
- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
### Adding or Updating 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 #
-->
The fix in https://github.com/vercel/next.js/pull/70680 is still
misleading. `missingSuspenseWithCSRBailout` is valid in `14` and invalid
in `Above 14`.
Co-authored-by: JJ Kasper <[email protected] >
2024-10-30 18:57:36 +00:00
5d972b5986
docs: fix incorrect link in url-deprecated.mdx ( #71787 )
...
## Summary
Delete an incorrect link and update a right link.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
---------
Co-authored-by: JJ Kasper <[email protected] >
2024-10-29 23:54:28 +00:00
5ea36c50c6
docs: rename md to mdx in errors directory ( #71785 )
...
## Description
Some files use `md` extension.
So, I corrected it by changing the extension to `mdx`.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: JJ Kasper <[email protected] >
2024-10-29 12:01:59 -07:00
7308aa8a23
docs: fix URL for error message ( #71788 )
...
## Description
Fix URL for https://nextjs.org/docs/messages/missing-root-layout-tags
❌ wrong:
https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts#root-layout-required
✅ correct:
https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates#root-layout-required
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: JJ Kasper <[email protected] >
2024-10-29 18:59:10 +00:00
fddd022e1b
docs: fix broken link of new comments path ( #71674 )
...
# Summary
Add missing comments path to which #61416 changed.
### Improving Documentation
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
Co-authored-by: JJ Kasper <[email protected] >
2024-10-29 11:54:28 -07:00
Antonis Angelis and GitHub
9d8b145dfc
Update sync-dynamic-apis.mdx ( #71907 )
2024-10-26 22:50:01 +02:00
Ismael and GitHub
ae282ae540
Next docs broken links ( #71823 )
2024-10-24 12:55:01 -07:00
Jiwon Choi and GitHub
ffde232be2
docs: remove "use cache" on before code snippet ( #71815 )
...
Removed `"use cache"` directive on the before example of the code
snippet.
2024-10-24 10:57:19 -07:00
Josh Story and GitHub
17f4291318
[dynamicIO] refine error message and docs ( #71781 )
...
refines the error message for non-prerenderable holes while prerendering
as well as the docs
2024-10-24 00:31:29 -07:00
Zack Tanner and GitHub
1cb70c485c
docs lint ( #71748 )
...
`easy` and `just` are failing lint checks.
2024-10-23 19:23:08 +00:00
3a39a205f7
[dynamicIO] update data access error and documentation ( #71738 )
...
It will be quite common to attempt to access data during prerendering
and encounter the error that indicates you did not provide a Suspense
boundary to define fallback UI. This change updates the error message
and includes a link to a new docs page which explains how to handle this
error.
---------
Co-authored-by: Delba de Oliveira <[email protected] >
2024-10-23 11:05:53 -07:00
5ff5c167e2
docs: fix typo in Link component example ( #71540 )
...
<!-- 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
- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
### Adding or Updating 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 #
-->
I noticed this typo on
https://nextjs.org/docs/messages/prefetch-true-deprecated
Co-authored-by: JJ Kasper <[email protected] >
2024-10-20 23:00:23 +00:00
Josh Story and GitHub
1f462140b9
[dynamicIO] refine error messaging for sync API access ( #71467 )
...
Temporarily removing the dev warnings. I've moved these to be errors in
the build side. In a follow up PR I will use prerendering during dev to
trigger these errors and report them as dev errors as well.
This also updates how we track sync dynamic errors. The main goal is to
have a stack trace of the sync function and separately report all the
component stacks that might contain this function call. It's not
fool-proof b/c the sync api may be called in a way that is not observed
by SSR. The whole debugging story here will improve dramatically with
owner stacks but that is currently experimental only in React.
The plan for future updates is to add a prospective render for SSR so we
can flush out module scope issues like calling Math.random while lazy
initializing a module. This is asserted for RSC in this change (see new
tests) but won't wouldn't pass for SSR b/c we only do single pass
prerendering at the moment.
After that I will add in the prerender-while-render in dev and utilize
the prerender errors to power dev as well.
2024-10-18 15:08:50 -07:00
b1f5d13902
[dynamicIO] clarify date docs ( #71459 )
...
The examples and wording are clarified to indicate how to think about
reading the current time during render.
---------
Co-authored-by: Zack Tanner <[email protected] >
2024-10-17 21:08:13 -07:00
0518f69eac
rename: .md to .mdx in errors directory ( #71240 )
...
## 🛠️ Rename
Hello, While reviewing the source code in `errors` directory, I found
that ONLY the `errors/next-request-in-use-cache.md` file uses `.md`
extension. So, I corrected it by changing the extension to `.mdx`.

Co-authored-by: JJ Kasper <[email protected] >
2024-10-17 14:37:12 -07:00
eaeb4023a1
Fix typo in version number ( #70680 )
...
Fix a typo in the error doc.
<!-- 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
- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
### Adding or Updating 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 <[email protected] >
2024-10-17 11:50:15 -07:00
Josh Story and GitHub
f93d8178ea
[dynamicIO] Error in dev when using sync platform APIs that are dynamic ( #71346 )
...
stacked on #71345
When dynamicIO is enabled certain platform APIs that provide access to
outside state like randomness and current time are augmented to bail out
of prerendering. When running in Dev there is no true Prerender but we
still want to communicate to the developer when they are using APIs that
might not work as they intend in Production. This change adds warnings
when you use these platform APIs during the Prerender portion of the dev
render.
2024-10-16 15:18:49 -07:00
2f6054f419
Docs: RC Updates ( #70031 )
...
**Do not merge.**
- [x] `staticgeneration*` options
- [x] `next/form` now available in pages, `prefetch` prop added to app
- [x] ~`next/after` stable~ reverted changes
- [x] `instrumentation.js` stable
- [x] More secure server actions
- [x] Update turbopack docs
- [x] https://nextjs.org/docs/architecture/turbopack
- [x] https://nextjs.org/docs/app/api-reference/next-config-js/turbo
- [x] Move `turbo` config option out of experimental
- [x] Document `connection()`
- [x] De-prioritize `unstable_noStore` - add note about using
`connection()`
- [x] Replace examples of `noStore` with `connection`
- [x] Async APIs
- [x] Reference Pages
- [x] `cookies`
- [x] `headers`
- [x] `draftMode`
- [x] `page.js` (`searchParams` and `params` prop)
- [x] `layout.js` (`params` prop)
- [x] `route.js` (`params` prop)
- [x] `default.js` (`params` prop)
- [x] Clarify `use` usage
https://vercel.slack.com/archives/C06N3AXRQ82/p1726483924090979?thread_ts=1726250070.321229&cid=C06N3AXRQ82
- [x] Update **examples** throughout the docs:
- [x] `cookies`
- [x] `headers`
- [x] `draftMode`
- [x] `searchParams`
- [x] `params`
- [x] Update Dynamic API section in the Server Components Page:
https://nextjs.org/docs/app/building-your-application/rendering/server-components#dynamic-rendering
- [x] Update Dynamic API mentions in Route Handler page:
https://nextjs.org/docs/app/building-your-application/routing/route-handlers#dynamic-functions
- [x] Update upgrade guide for Next 15 RC:
https://nextjs.org/docs/app/building-your-application/upgrading/version-15
- [x] Document codemods for async APIs. PR:
https://github.com/vercel/next.js/pull/69572
- [x] Document geo codemod. Done here:
https://github.com/vercel/next.js/pull/70064
Closes: https://linear.app/vercel/issue/DOC-3018/nextjs-15-rc-2
---------
Co-authored-by: Rich Haines <[email protected] >
Co-authored-by: Ahmed Abdelbaset <[email protected] >
Co-authored-by: Nikhil S <[email protected] >
2024-10-14 11:41:49 +01:00
1b89b4b988
feat: block compilation on codemod comments and ask to remove ( #71103 )
...
Co-authored-by: 강동윤 (Donny) <[email protected] >
2024-10-11 19:37:38 +02:00
Zack Tanner and GitHub
61f5b95cf6
docs: misc typo corrections in upgrade guide & codemod ( #71098 )
...
Caught these when reviewing the published changes.
2024-10-10 17:52:08 +02:00
Zack Tanner and GitHub
af80d80132
polish sync-dynamic-apis error page ( #71049 )
...
Grammar, clarity, and formatting fixes.
2024-10-09 19:41:37 -07:00
Jiwon Choi and GitHub
355b3f588e
docs: fix URL for error message ( #71003 )
...
Fix URL for https://nextjs.org/docs/messages/missing-root-layout-tags
2024-10-09 17:29:24 +09:00
Sebastian "Sebbie" Silbermann and GitHub
772b0ea271
condense warnings for direct access of dynamic APIs ( #70682 )
2024-10-02 14:15:08 +02:00
Steven and GitHub
a9c045de13
feat(next/image): add images.localPatterns config ( #70529 )
...
This adds support for `images.localPatterns` config to allow specific
local images to be optimized and (more importantly) block anything that
doesn't match a pattern.
2024-10-01 14:45:10 -07:00
Sebastian Markbåge and GitHub
b8d1ef75bc
Wire AsyncLocalStorage within a cached context ( #70573 )
...
This ensures we exit the RequestStorage/PrerenderStorage context and
anything else but keeps the StaticGenerationStore (which should no
longer have page/request specific information). I also create new
CacheStore which will be used for life/tags but for now is just used to
provide a better error when cookies/headers/draftMode are accessed
within the cache scope.
I tried to make `React.cache` AsyncLocalStorage scope be shared between
the invocation of the cached function and anything it renders later.
This is also necessary in case the cached function calls Float methods
like `preload()`. However, I hit issues with preserving debug info,
having the right owner and that rendering a Promise in a Server
Component turns it into a `React.lazy` for now which doesn't preserve
the type we want. The proper solution is for React to expose a larger
scope for `React.cache` and float.
2024-09-30 19:08:14 +00:00
aecc50ec0b
docs mention next/compat/router ( #70425 )
...
Lands https://github.com/vercel/next.js/pull/54317 as we can't update
the history cleanly on that PR anymore
Closes: https://github.com/vercel/next.js/pull/54317
Co-authored-by: Andrés Martínez <[email protected] >
2024-09-24 15:43:47 -07:00
7f41ea9111
docs: update prerender error ( #69744 )
...
Just adding more details here, as it was pretty bare before.
---------
Co-authored-by: JJ Kasper <[email protected] >
2024-09-13 18:17:51 +00:00
1710b3dc5d
Update prerender-error.mdx ( #68747 )
...
This is how I fixed the issue when this error message came up in my
command line.
<!-- 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
- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide
### Adding or Updating 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: Lee Robinson <[email protected] >
2024-09-12 14:19:02 -07:00
Lee Robinson and GitHub
ad268ef318
docs: improve no async client components page ( #69440 )
...
Some good feedback that this page was very barebones. Added more details
and options.
2024-08-29 09:23:43 -05:00
Steven and GitHub
50b5c7b597
chore(docs): update docs for error message no-img-element ( #69312 )
...
The `unoptimized` option was a bit hidden so I added an example code
snippet.
x-ref: https://x.com/KibruKuture/status/1827597148424175678
2024-08-26 15:36:10 -05:00
Wes Bos and GitHub
c29810dc35
docs: Add required legacyBehavior for passHref to work ( #68897 )
2024-08-23 09:12:15 -05:00