Docs: Fix upgrade guide files (#59249)

- Add v14 update guide to /app router docs
- Fix duplicate /upgrading folders
This commit is contained in:
Delba de Oliveira 2023-12-04 14:55:46 +00:00 committed by GitHub
parent c1fba5735c
commit 63a578f1c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 29 deletions

View file

@ -0,0 +1,36 @@
---
title: Version 14
description: Upgrade your Next.js Application from Version 13 to 14.
---
{/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}
## Upgrading from 13 to 14
To update to Next.js version 14, run the following command using your preferred package manager:
```bash filename="Terminal"
npm i next@latest react@latest react-dom@latest eslint-config-next@latest
```
```bash filename="Terminal"
yarn add next@latest react@latest react-dom@latest eslint-config-next@latest
```
```bash filename="Terminal"
pnpm up next react react-dom eslint-config-next --latest
```
```bash filename="Terminal"
bun add next@latest react@latest react-dom@latest eslint-config-next@latest
```
> **Good to know:** If you are using TypeScript, ensure you also upgrade `@types/react` and `@types/react-dom` to their latest versions.
### v14 Summary
- The minimum Node.js version has been bumped from 16.14 to 18.17, since 16.x has reached end-of-life.
- The `next export` command is deprecated in favor of `output: 'export'`. Please see the [docs](https://nextjs.org/docs/app/building-your-application/deploying/static-exports) for more information.
- The `next/server` import for `ImageResponse` was renamed to `next/og`. A [codemod is available](/docs/app/building-your-application/upgrading/codemods#next-og-import) to safely and automatically rename your imports.
- The `@next/font` package has been fully removed in favor of the built-in `next/font`. A [codemod is available](/docs/app/building-your-application/upgrading/codemods#built-in-next-font) to safely and automatically rename your imports.
- The WASM target for `next-swc` has been removed.

View file

@ -1,34 +1,7 @@
---
title: Version 14
description: Upgrade your Next.js Application from Version 13 to 14.
source: app/building-your-application/upgrading/version-14
---
## Upgrading from 13 to 14
To update to Next.js version 14, run the following command using your preferred package manager:
```bash filename="Terminal"
npm i next@latest react@latest react-dom@latest eslint-config-next@latest
```
```bash filename="Terminal"
yarn add next@latest react@latest react-dom@latest eslint-config-next@latest
```
```bash filename="Terminal"
pnpm up next react react-dom eslint-config-next --latest
```
```bash filename="Terminal"
bun add next@latest react@latest react-dom@latest eslint-config-next@latest
```
> **Good to know:** If you are using TypeScript, ensure you also upgrade `@types/react` and `@types/react-dom` to their latest versions.
### v14 Summary
- The minimum Node.js version has been bumped from 16.14 to 18.17, since 16.x has reached end-of-life.
- The `next export` command is deprecated in favor of `output: 'export'`. Please see the [docs](https://nextjs.org/docs/app/building-your-application/deploying/static-exports) for more information.
- The `next/server` import for `ImageResponse` was renamed to `next/og`. A [codemod is available](/docs/app/building-your-application/upgrading/codemods#next-og-import) to safely and automatically rename your imports.
- The `@next/font` package has been fully removed in favor of the built-in `next/font`. A [codemod is available](/docs/app/building-your-application/upgrading/codemods#built-in-next-font) to safely and automatically rename your imports.
- The WASM target for `next-swc` has been removed.
{/* DO NOT EDIT. The content of this doc is generated from the source above. To edit the content of this page, navigate to the source page in your editor. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}