tusbar / babel-plugin-dotenv-import

Load environment variables using import statements.
MIT License
80 stars 8 forks source link

feat: allowlisting which variables can be undefined #379

Open preynal opened 11 months ago

preynal commented 11 months ago

This PR enables defining allowUndefined as an array of variables that will not throw even if the var is undefined. It doesn't change the behaviour when allowUndefined is true or false

{
  "plugins": [
    ["dotenv-import", {
      "allowUndefined": ["ALLOWED_UNDEFINED_VAR"]
    }]
  ]
}