Closed eakenbor closed 3 months ago
You'd have to define envs when creating AdminJS instance:
new AdminJS({
env: {
GOOGLE_MAPS_API_KEY: 'xxx',
}
})
and you'll be able to access it via window.AdminJS.env.GOOGLE_MAPS_API_KEY
@dziraf thanks
Contact Details
No response
What happened?
I have a function in my server code that relies on process.env.GOOGLE_MAPS_API_KEY. Whenever I call the function within my server codes, process.env.GOOGLE_MAPS_API_KEY is read. But, when I call it inside an Adminjs component, it appears as undefined. Please how can I solve this problem, please?
Bug prevalence
Every time
AdminJS dependencies version
"adminjs": "^7.0.5"
What browsers do you see the problem on?
Chrome
Relevant log output
No response
Relevant code that's giving you issues
No response