> 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: ReactLynxExternalsPresetOptions

Options for the built-in `reactlynx` externals preset.

## Properties

### async?

> `optional` **async?**: `boolean` | ((`context`: `object`) => `boolean`)

Choose asynchronous loading of the ReactLynx runtime bundle.

The web runtime (`@lynx-js/web-core`) can only fetch external bundles
asynchronously (`fetchBundle().then`), so ReactLynx must be mounted as a
promise that consuming modules await before reading a subpath (otherwise
`React.memo` etc. are read off a pending promise and are `undefined`).
A standalone callback can choose the loading mode at runtime using
`systemInfo`. It is serialized into the bundle and cannot capture variables
or imports from the build configuration. Callback mode always makes the
consuming modules asynchronous, even when synchronous loading is selected.

Only controls how the runtime is mounted; the web bundle is chosen for
environments other than `lynx` / `lynx-*`.

#### Example

```js
{ async: ({ systemInfo }) => ['Harmony', 'web'].includes(String(systemInfo['platform'])) }
```

#### Default Value

`false`

***

### bundlePath?

> `optional` **bundlePath?**: `string`

Emit the ReactLynx runtime bundle into the current build output and load it
through the generated runtime public path.

Prefer this over `url` for normal Rspeedy projects. In addition to letting
the runtime resolve the final URL from `publicPath`, the plugin will also
copy the corresponding `@lynx-js/react-umd` bundle into the emitted assets,
so application bundles can reference it without requiring an extra manual
copy step when publishing.

#### Default Value

`'react.lynx.bundle'`, or `'react.web.bundle'` outside
`lynx` / `lynx-*` environments

***

### reactUmdPackageName?

> `optional` **reactUmdPackageName?**: `string`

Package name that provides the ReactLynx runtime bundle.

Override this when wrapping the plugin for another distribution, such as
`@byted-lynx/react-umd`.

#### Default Value

`'@lynx-js/react-umd'`

***

### ~~url?~~

> `optional` **url?**: `NonNullable`\<`string` | (() => `string` | `Promise`\<`string`>) | `undefined`>

Override the runtime bundle URL directly.

Use this only when the ReactLynx runtime is hosted outside the current
build output, for example on a CDN. Unlike `bundlePath`, this does not emit
any extra asset into the current compilation.

#### Deprecated

Prefer `bundlePath`, which resolves through the runtime public
path and enables automatic asset emission.
