Skip to content

Commit

Permalink
fix missing command in next-codemod (#67216)
Browse files Browse the repository at this point in the history
Running `pnpx @next/codemod@canary next-dynamic-access-named-export`
found the following error

```
Invalid transform choice, pick one of:
- name-default-component
- add-missing-react-import
- withamp-to-config
- url-to-withrouter
- cra-to-next
- new-link
- next-og-import
- metadata-to-viewport-export
- next-image-to-legacy-image
- next-image-experimental
- built-in-next-font
```

Turns out we're missing it in cli command list
  • Loading branch information
huozhi authored Jun 27, 2024
1 parent 72a6408 commit 3d3f02e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/next-codemod/bin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ const TRANSFORMER_INQUIRER_CHOICES = [
name: 'metadata-to-viewport-export: Migrates certain viewport related metadata from the `metadata` export to a new `viewport` export.',
value: 'metadata-to-viewport-export',
},
{
name: 'next-dynamic-access-named-export: Transforms dynamic imports that return the named export itself to a module like object.',
value: 'next-dynamic-access-named-export',
},
{
name: 'next-image-to-legacy-image: safely migrate Next.js 10, 11, 12 applications importing `next/image` to the renamed `next/legacy/image` import in Next.js 13',
value: 'next-image-to-legacy-image',
Expand Down

0 comments on commit 3d3f02e

Please # to comment.