function processEnv(dir) {
    // replicate Next.js handling/behavior, but without a default NODE_ENV
    // https://github.com/vercel/next.js/blob/v10.0.5/packages/next-env/index.ts#L80-L90
    var mode = process.env.NODE_ENV;
    var dotenvFiles = [
        mode && ".env." + mode + ".local",
        // Don't include `.env.local` for `test` environment
        // since normally you expect tests to produce the same
        // results for everyone
        mode !== 'test' && '.env.local',
        mode && ".env." + mode,
        '.env',
    ].filter(Boolean);
    // inspired by https://github.com/entropitor/dotenv-cli/blob/v4.0.0/cli.js#L53-L55
    dotenvFiles.forEach(function (env) {
        dotenv_expand_1.default(dotenv.config({ path: path_1.default.resolve(dir, env) }));
    });
}
/**
 * @param {string} dir The directory containing the .env files to load.
 */
@param {string} dir The directory containing the .env files to load.
@param { string } dir The directory containing the . env files to load .
function processEnv(dir) {
    var mode = process.env.NODE_ENV;
    var dotenvFiles = [
        mode && ".env." + mode + ".local",
        mode !== 'test' && '.env.local',
        mode && ".env." + mode,
        '.env',
    ].filter(Boolean);
    dotenvFiles.forEach(function (env) {
        dotenv_expand_1.default(dotenv.config({ path: path_1.default.resolve(dir, env) }));
    });
}
function processEnv ( dir ) { var mode = process . env . NODE_ENV ; var dotenvFiles = [ mode && ".env." + mode + ".local" , mode !== 'test' && '.env.local' , mode && ".env." + mode , '.env' , ] . filter ( Boolean ) ; dotenvFiles . forEach ( function ( env ) { dotenv_expand_1 . default ( dotenv . config ( { path : path_1 . default . resolve ( dir , env ) } ) ) ; } ) ; }
@param {string} dir The directory containing the .env files to load.
@param { string } dir The directory containing the . env files to load .
// replicate Next.js handling/behavior, but without a default NODE_ENV // https://github.com/vercel/next.js/blob/v10.0.5/packages/next-env/index.ts#L80-L90 // Don't include `.env.local` for `test` environment // since normally you expect tests to produce the same // results for everyone // inspired by https://github.com/entropitor/dotenv-cli/blob/v4.0.0/cli.js#L53-L55