next-codemod-use-client
v0.1.1
Published
Codemod for removing unnecessary 'use client' directives
Downloads
11
Maintainers
Readme
next-codemod-use-client
Codemod for removing unnecessary "use client" directives in Next.js projects.
How it works
Verify imported components from entrypoint (e.g., layout.tsx, page.tsx) and use import tree information to determine if they're imported by server or client components, subsequently removing unnecessary "use client" directives.
Usage
# Run in the root of your Next.Js project:
npx next-codemod-use-clientCreated by @gsporto.
