rsnext/packages/next-codemod/transforms
Jiachi Liu c8925c36db
codemod: add next/dynamic imports codemod (#67126)
### What

Provide a codemod to transform the promise of the access to named export
properties in dynamic import `next/dynamic`, this codemod transform all
the `next/dynamic` imports to ensure returning an object value with
`default` property, aligning with what `React.lazy` is returning

### Why

Follow up for #66990 

It's not allowed to do dynamic import and access it's named export while
using `next/dynamic` in server component, and the dynamic import module
is from a client component. It's like accessing the nested client side
property of a module
2024-06-25 12:17:44 +00:00
..
__testfixtures__ codemod: add next/dynamic imports codemod (#67126) 2024-06-25 12:17:44 +00:00
__tests__ codemod: add next/dynamic imports codemod (#67126) 2024-06-25 12:17:44 +00:00
add-missing-react-import.ts enable verbatimModuleSyntax to make type imports/exports explicit (#56551) 2023-10-07 15:09:54 +00:00
built-in-next-font.ts Only run toSource in next/font codemod if there are changes (#46877) 2023-03-07 11:21:03 -08:00
cra-to-next.ts chore: update prettier to 3.2.5 (#65092) 2024-05-08 21:47:14 +02:00
metadata-to-viewport-export.ts codemods: migrate viewport related metadata export to viewport export (#57436) 2023-10-25 16:02:14 -07:00
name-default-component.ts enable verbatimModuleSyntax to make type imports/exports explicit (#56551) 2023-10-07 15:09:54 +00:00
new-link.ts enable verbatimModuleSyntax to make type imports/exports explicit (#56551) 2023-10-07 15:09:54 +00:00
next-dynamic-access-named-export.ts codemod: add next/dynamic imports codemod (#67126) 2024-06-25 12:17:44 +00:00
next-image-experimental.ts fix: codemod should preserve type only import (#46512) 2023-02-27 21:36:26 +00:00
next-image-to-legacy-image.ts fix: codemod should preserve type only import (#46512) 2023-02-27 21:36:26 +00:00
next-og-import.ts codemod: migrate ImageResponse imports (#57074) 2023-10-19 20:02:25 +00:00
url-to-withrouter.ts Move next-codemod to Next.js monorepo (#15536) 2020-08-10 11:14:53 +02:00
withamp-to-config.ts fix: next-image-experimental codemod (#45970) 2023-02-17 01:36:09 +00:00