Strapi V4 Customize Page Using Patch-Package

I want to change the text inside login page with my custom text. I make some changes on node_modules/@strapi/admin/src/pages/AuthPage/components/Login/BaseLogin.js

Before editing that file, I install patch-package dependencies into my project. Inside project package.json file I added "postinstall": "patch-package" too.

After make some changes on file, I run this command yarn patch-package @strapi/admin

After finished I saw there are patches folder created and inside that folder I can saw the file which have diff code.

But, when I re run the strapi admin frontend, on login page text which I already changed still display original text from strapi.

Is there any mistakes I made on the steps ?

I used strapi version 4.4.3

Thanks before.

8

2 Answers

For modifying texts and colors in the admin, you don't need to patch the stapi package, you should override the global theme of your application by going through /src/admin/app.js and exporting a theme object. See the docs related to that here (V4) : Visit

1

want you please try yarn run build after the patch folder was created. This will normally fix your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest