Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin configuration needs to be inside .config/env/ #98

Open
jiv-e opened this issue Nov 10, 2023 · 2 comments
Open

Plugin configuration needs to be inside .config/env/ #98

jiv-e opened this issue Nov 10, 2023 · 2 comments

Comments

@jiv-e
Copy link

jiv-e commented Nov 10, 2023

Many people have reported problems with the plugin not working as documented. I had the same problem. I installed the plugin. Added ./config/plugins.js file as documented and nothing happened.

I found out that plugins.js file inside ./config folder is ignored by Strapi at least in the case you are having a ./config/env folder.

See: https://github.com/strapi/strapi/blob/d999ad0b00ff427885462051cdc96626b7946472/packages/core/strapi/src/core/app-configuration/index.ts#L54

I managed to fix the issue by moving the plugins.js file inside my env folder's respective environment folders (development, production, ...).

Like this.

Before:

./config
  plugins.js

After:

./config
  /env
    /development
      plugins.js
    /production
      plugins.js

Could you add this to the documentation?

@ComfortablyCoding
Copy link
Contributor

ComfortablyCoding commented Nov 13, 2023

It is possible they changed this but per the docs (and from what I have observed in the past) the envs should be merged with the base one.

I will check this and add any relevant info to the docs as needed.

@ukashazia
Copy link

ukashazia commented Dec 21, 2023

Many people have reported problems with the plugin not working as documented. I had the same problem. I installed the plugin. Added ./config/plugins.js file as documented and nothing happened.

I found out that plugins.js file inside ./config folder is ignored by Strapi at least in the case you are having a ./config/env folder.

See: https://github.com/strapi/strapi/blob/d999ad0b00ff427885462051cdc96626b7946472/packages/core/strapi/src/core/app-configuration/index.ts#L54

I managed to fix the issue by moving the plugins.js file inside my env folder's respective environment folders (development, production, ...).

Like this.

Before:

./config
  plugins.js

After:

./config
  /env
    /development
      plugins.js
    /production
      plugins.js

Could you add this to the documentation?

this doesn't seem to work either

Edit: My bad, i was exporting 2 modules at once in plugins.js file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants