Plugin Toolkit support for dotenv

It would be great to add dotenv support to the plugin toolkit.

As developer we need to be able to ensure our plugins can easily target different environments in our product development workspace. We might have different URL to connect to for each of our Development, Testing or Production environments.

in the package.json it would be great to be able to specify for example

"build:development": "grafana-toolkit plugin:build -mode development"

this would pick up our .env.development (or .env.developement.local) configuration file and in our ode we can then say use process.env.MY_SETTING

this is similar to what has been set up in the Vue cli

1 Like