> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Function: loadConfig()

> **loadConfig**(`loadConfigOptions`: [`LoadConfigOptions`](/next/api/packages/rspeedy/interfaces/LoadConfigOptions.md)): `Promise`\<[`LoadConfigResult`](/next/api/packages/rspeedy/interfaces/LoadConfigResult.md)>

Load the build config by the config path.

## Parameters

| Parameter           | Type                                                                              | Description                         |
| ------------------- | --------------------------------------------------------------------------------- | ----------------------------------- |
| `loadConfigOptions` | [`LoadConfigOptions`](/next/api/packages/rspeedy/interfaces/LoadConfigOptions.md) | the options of `loadConfig` method. |

## Returns

`Promise`\<[`LoadConfigResult`](/next/api/packages/rspeedy/interfaces/LoadConfigResult.md)>

Build config.

## Example

```ts
import { loadConfig } from '@lynx-js/rspeedy'

void async function () {
  const config = await loadConfig({ configPath: './lynx.config.js' })
  console.log(config);
}()
```
