code: function getConfigPath(configPaths) {
    let conf = null;
  
    // Try all config paths and return for the first found one
    some(configPaths, configPath => {
      if (!configPath) return;
  
      // Compile config using environment variables
      const compiledConfigPath = template(configPath)(process.env);
  
      let resolvedConfigPath = resolve(process.cwd(), compiledConfigPath);
      const resolvedName = fileExists(resolvedConfigPath);
  
      if (resolvedConfigPath && resolvedName) {
        conf = resolvedName;
      }
  
      return conf;
    });
  
    return conf;
  }
docs: most of this file is a copypaste from https://github.com/trayio/babel-plugin-webpack-alias/blob/master/src/index.js just cos we emulate its behavior