How to use Custom Plugin's config value?

System Information
  • Strapi Version:
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

Hello,

How to use config:{} values inside custom-plugin?
when we add custom-plugin into the /config/Plugins.js

thanks in advance

Hey @muammer_keles, you can fetch the config value from plugins using the below method provided by strapi

const { fieldName } = strapi.config.get("plugin.plugin-name")

Hope this helps you :slight_smile:

1 Like

Thank you Shekhar

It’s very good to know.

i think strapi does not expose config in “/admin/src”
So that why you showed me, it works only in “/server/”
I think related to security case.

Anyway…
There is a way that we can send data from “/server/” to “/admin/”
For whoever needs info.

Thanks Shekhar

fetching it using useFetchClient

1 Like