How to use the read-config-file/out/deepAssign.deepAssign 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-webpack / packages / electron-webpack / src / main.ts View on Github external
}
    }
  }

  if (env == null) {
    env = {}
  }

  const projectDir = (env.configuration || {}).projectDir || process.cwd()
  const packageMetadata = getPackageMetadata(projectDir)
  const electronWebpackConfig = await getElectronWebpackConfiguration({
    packageMetadata,
    projectDir,
  })
  if (env.configuration != null) {
    deepAssign(electronWebpackConfig, env.configuration)
  }

  await validateConfig(electronWebpackConfig, schemeDataPromise, message => {
    return `${message}

How to fix:
1. Open https://webpack.electron.build/configuration
2. Search the option name on the page.
  * Not found? The option was deprecated or not exists (check spelling).
  * Found? Check that the option in the appropriate place. e.g. "sourceDirectory" only in the "main" or "renderer", not in the root.
`
  })
  return new WebpackConfigurator(type, env, electronWebpackConfig, await packageMetadata.value)
}

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