Search code examples
reactjsstrapi

How to fix a bug in an external Strapi plugin?


I installed this strapi plugin: https://github.com/kwinyyyc/strapi-plugin-wysiwsg-react-md-editor

It had a bug - styles did not apply to relevant elements. I fixed this bug by downloading the package, placing it in /plugins folder and adding the styles myself.

Although it works, I doubt that this is a good solution for performance and project structure reasons.

So, the questions are:

  • Could I fix this bug by creating and /extension folder and trying to extend this plugin with strapi-admin.js?
  • Would I need to create middlewares and somehow inject the styles in the component?
  • How do you fix Strapi plugins without messing around in source code?

Thanks!


Solution

  • I found out that the only way to fix external strapi plugins is to go into the node_modules folder and fixing it there.

    There's a good package for that: patch-package.