How to access Environment Variables inside plugin? #15000
Answered
by
remjx
remjx
asked this question in
Questions and Help
-
In one of my plugin files...
If neither of these work, how can I access environment variables from within a plugin? |
Beta Was this translation helpful? Give feedback.
Answered by
remjx
Feb 9, 2021
Replies: 1 comment
-
My workaround is to pass the environment variable into the plugin function from the In
In
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
remjx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My workaround is to pass the environment variable into the plugin function from the
config
object that is available from the plugin index export function.In
plugins/index.ts
:In
plugins/myPlugin.ts
I use the passed env var and return the plugin function: