How to use the read-config-file.loadParentConfig function in read-config-file

To help you get started, we’ve selected a few read-config-file examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electron-userland / electron-builder / packages / app-builder-lib / src / util / config.ts View on Github external
file = require.resolve(file)
      }
      catch (ignore) {
        file = require.resolve("electron-webpack/electron-builder.yml")
      }
      config.extends = `file:${file}`
    }
  }

  let parentConfig: Configuration | null
  if (config.extends === "react-cra") {
    parentConfig = await reactCra(projectDir)
    log.info({preset: config.extends}, "loaded parent configuration")
  }
  else if (config.extends != null) {
    const parentConfigAndEffectiveFile = await loadParentConfig(configRequest, config.extends)
    log.info({file: parentConfigAndEffectiveFile.configFile}, "loaded parent configuration")
    parentConfig = parentConfigAndEffectiveFile.result
  }
  else {
    parentConfig = null
  }

  return doMergeConfigs(config, parentConfig)
}

read-config-file

Read configuration file in various formats:

MIT
Latest version published 6 months ago

Package Health Score

67 / 100
Full package analysis

Similar packages