Skip to content

Commit

Permalink
docs: add app-dir-runtime-config-experimental-edge codemod (#71008)
Browse files Browse the repository at this point in the history
Added missing docs for codemod #70968
  • Loading branch information
devjiwonchoi authored Oct 9, 2024
1 parent 6ae92cc commit 9eb0237
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,30 @@ Replacing `<transform>` and `<path>` with appropriate values.

### 15.0

#### Transform App Router Route Segment Config `runtime` value from `experimental-edge` to `edge`

##### `app-dir-runtime-config-experimental-edge`

> **Note**: This codemod is App Router specific.
```bash filename="Terminal"
npx @next/codemod@latest app-dir-runtime-config-experimental-edge .
```

This codemod transforms [Route Segment Config `runtime`](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#runtime) value `experimental-edge` to `edge`.

For example:

```ts
export const runtime = 'experimental-edge'
```

Transforms into:

```ts
export const runtime = 'edge'
```

#### Migrate to async Dynamic APIs

##### `next-async-request-api`
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const TRANSFORMER_INQUIRER_CHOICES = [
},
{
title:
'Transforms `experimental-edge` to `edge` in the `runtime` route segment configuration within the App Router',
'Transform App Router Route Segment Config `runtime` value from `experimental-edge` to `edge`',
value: 'app-dir-runtime-config-experimental-edge',
version: '15.0.0-canary.179',
},
Expand Down

0 comments on commit 9eb0237

Please sign in to comment.