criminal-purple
criminal-purple8mo ago

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
kapa.ai
kapa.ai8mo ago
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:
npx @refinedev/codemod antd4-to-antd5
npx @refinedev/codemod antd4-to-antd5
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:
npm uninstall @pankod/refine-core @pankod/refine-antd @pankod/..
npm i @refinedev/core @refinedev/antd @refinedev/..
npm uninstall @pankod/refine-core @pankod/refine-antd @pankod/..
npm i @refinedev/core @refinedev/antd @refinedev/..
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: ----------------------
kapa.ai
kapa.ai8mo ago
<@1014305963219615754> kapa.ai is still learning and improving, please let us know how it did by reacting below
criminal-purple
criminal-purple8mo ago
rare-sapphire
rare-sapphire8mo ago
you can use this. this will transform antd imports to @refinedev/antd npx @refinedev/codemod@next refine3-to-refine4