Refactor Imports from @next/font to next/font
This codemod refactors import statements in your code to replace @next/font with next/font, aligning with the latest Next.js module structure.
-
Find Import Declarations: Identifies all ImportDeclaration nodes in the code.
-
Check Import Path: Ensures that the import path starts with @next/font.
-
Replace Import Path: Updates the import path to use next/font instead of @next/font.
Before
js
After
js