---
url: /reference/Function.loadConfig.md
---
# Function: loadConfig()

* **Exported from**: `rolldown/config`
* **Type**: (`configPath`: `string`, `options`: `LoadConfigOptions`) => `Promise`<[`ConfigExport`](TypeAlias.ConfigExport.md)>

Load config from a file in a way that Rolldown does.

## Parameters

### configPath

`string`

The path to the config file. If empty, it will look for `rolldown.config` with supported extensions in the current working directory.

### options?

`LoadConfigOptions` = `{}`

Loading options. `configLoader` selects `'bundle'` (default) or `'native'`.

## Returns

`Promise`<[`ConfigExport`](TypeAlias.ConfigExport.md)>

The loaded config export
