According to the Strapi team, there used to be an extensions feature but they got rid of it cause it kept causing a lot of bugs and they advice using patch-package.
Here’s a simple example of how to achieve this.
First install patch-package and postinstall using one of the following commands
yarn add patch-package postinstall-postinstall
or
npm i patch-package postinstall-postinstall
you can add a ‘–dev’ flag if you don’t wanna use it in production
add the following command to your scripts in your ‘package.json’ file
"scripts":{
//..
+ "postinstall": "patch-package"
//..
}
next go into the node_modules
folder and find the @strapi
directory in which you’ll find the different components available by default.
A sample change like in my case was changing the content in the Homepage which I was able to find in the @strapi/admin/admin/src/pages/HomePage
directory.
After making changes to the index.js
file for example, head to your terminal and run yarn patch-package @strapi/admin
.
This will create a patch folder in the root directory of your project with the changes made. Once the operation is done running, run yarn build
and then yarn develop
and your changes should be properly reflected. Not the most convenient of methods and that’s understandable but it’s the most effective method i could find online right now. I encourage you to read the patch-package
docs for more info on how to use it. Good luck