next-codemod-use-client

0.1.1 • Public • Published

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-client

Created by @gsporto.

Package Sidebar

Install

npm i next-codemod-use-client

Weekly Downloads

2

Version

0.1.1

License

ISC

Unpacked Size

21 kB

Total Files

6

Last publish

Collaborators

  • gsporto