npx codemod@latest init
in your desired location to store the codemod folder, and select workflow
as your engine. This sets up the scaffolding for your codemod, making it easy to provide configuration and metadata. While optional for building and running a codemod, this step enhances discoverability and sharing.
mui-named-import-to-direct-import
and file inside src/index.ts
. Let’s update this boilerplate file.
We need to get all the files that potentially can have Material UI Icons imports
$$$_
pattern means any number of elements, in our case any number of named imports.