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

# Interface: LynxConfig

**`Beta`**

The Lynx config that `pluginLynx` exposes to other plugins.

## Remarks

The data mirrors [LynxPluginOptions](/next/api/packages/rsbuild-plugin/interfaces/LynxPluginOptions.md), so a plugin reads
`config.output.filename` the same way it reads `output.filename` from
`api.getRsbuildConfig()`. Values that depend on the entry being built are
derived by the methods, which travel with the data so that the plugin that
built the config is always the one that resolves it.

## Example

```js
const lynx = getLynxConfig(api)
const filename = lynx.resolveBundleFilename({
  entryName: 'main',
  platform: environment.name,
})
```

## Properties

### output

> `readonly` **output**: [`LynxOutput`](/next/api/packages/rsbuild-plugin/interfaces/LynxOutput.md)

**`Beta`**

The build outputs.

***

### performance

> `readonly` **performance**: [`LynxPerformance`](/next/api/packages/rsbuild-plugin/interfaces/LynxPerformance.md)

**`Beta`**

The performance options.

## Methods

### resolveBundleFilename()

> **resolveBundleFilename**(`context`: `object`): `string`

**`Beta`**

Resolve the name of the bundle file of an entry.

#### Parameters

| Parameter           | Type                                              | Description                        |
| ------------------- | ------------------------------------------------- | ---------------------------------- |
| `context`           | \{ `entryName`: `string`; `platform`: `string`; } | The entry to resolve the name for. |
| `context.entryName` | `string`                                          | -                                  |
| `context.platform`  | `string`                                          | -                                  |

#### Returns

`string`

***

### resolveIntermediateDir()

> **resolveIntermediateDir**(`context?`: `object`): `string`

**`Beta`**

Resolve the directory of the intermediate files.

#### Parameters

| Parameter            | Type                         | Description                                                                                                        |
| -------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `context?`           | \{ `entryName?`: `string`; } | The entry to resolve the directory for. Without an entry name, the directory that holds every entry's is returned. |
| `context.entryName?` | `string`                     | -                                                                                                                  |

#### Returns

`string`

#### Remarks

A Lynx bundle is encoded from per-thread JS, CSS and HMR outputs. They are
emitted into this directory, per entry, instead of next to the bundle.

***

### resolveLazyBundleFilename()

> **resolveLazyBundleFilename**(`context`: `object`): `string` | `undefined`

**`Beta`**

Resolve the name of the lazy bundle files.

#### Parameters

| Parameter          | Type                       | Description                              |
| ------------------ | -------------------------- | ---------------------------------------- |
| `context`          | \{ `platform`: `string`; } | The environment to resolve the name for. |
| `context.platform` | `string`                   | -                                        |

#### Returns

`string` | `undefined`

The resolved name, or `undefined` when [LynxFilename.bundle](/next/api/packages/rsbuild-plugin/interfaces/LynxFilename.md#bundle)
is not a function. A lazy bundle name can only be customized by a function,
since it is resolved per async chunk, so `undefined` means the caller
leaves the name to `LynxTemplatePlugin`.

#### Remarks

There is no entry name to resolve `[name]` with, so the placeholder is
kept for `LynxTemplatePlugin` to fill in per async chunk.
