Refine v3 Codemod for Antd v3 to v4?
I am realizing I still have @pankod/refine-antd v3 and am trying to upgrade to v4... is there a codemod that can help with this?
4 Replies
Hi @geoffatsource. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Yes, there is a codemod that can help you with this. The
@refinedev/codemod
package can handle the breaking changes for your project automatically, migrating your @refinedev/antd
version from 3.x.x to 4.x.x without any manual steps.
Here's how you can use it:
1. Navigate to the root folder of your project (where package.json
is contained).
2. Run the following command:
After running this command, your project should now be using @refinedev/antd@4.x.x
.
Please note that customized or swizzled components and .less files cannot be migrated automatically. You will need to migrate them manually.
For more details, you can refer to the Migration Guide (https://refine.dev/docs/api-reference/antd/migration-guide/v4-to-v5/).
Also, remember that the Refine NPM organization has changed from @pankod
to @refinedev
, so you must install the packages with the new organization name. You can do this by running:
You must make this change for all packages that start with @pankod
.
For more information on migrating from 3.x.x to 4.x.x, you can refer to the Migration Guide (https://refine.dev/docs/migration-guide/3x-to-4x/).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1014305963219615754> kapa.ai is still learning and improving, please let us know how it did by reacting below
adverse-sapphire•13mo ago
Ideally I want this https://refine.dev/docs/3.xx.xx/api-reference/antd/migration-guide/v4-to-v5/#updating-the-packages to refer to
v3-to-v4
like-gold•13mo ago
you can use this. this will transform antd imports to @refinedev/antd
npx @refinedev/codemod@next refine3-to-refine4