@karmaniverous/get-dotenv
    Preparing search index...

    Function getDotenv

    • Asynchronously process dotenv files of the form .env[.<ENV>][.<PRIVATE_TOKEN>]

      Parameters

      Returns Promise<ProcessEnv>

      The combined parsed dotenv object. *

      const vars = await getDotenv();
      console.log(vars.MY_SETTING);
      const vars = await getDotenv({
      env: 'dev',
      dotenvToken: '.testenv',
      privateToken: 'secret',
      paths: ['./', './packages/app'],
      });
      // .env.js default-exports: { DYNAMIC: ({ PREV }) => `${PREV}-suffix` }
      const vars = await getDotenv({ dynamicPath: '.env.js' });
      • When GetDotenvOptions.loadProcess is true, the resulting variables are merged into process.env as a side effect.
      • When GetDotenvOptions.outputPath is provided, a consolidated dotenv file is written. The path is resolved after expansion, so it may reference previously loaded vars.

      Error when a dynamic module is present but cannot be imported.

      Error when an output path was requested but could not be resolved.