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

# lib.umdName

- **Type:** `string | string[] | { amd?: string, commonjs?: string, root?: string | string[] }`
- **Default:** `undefined`

The export name of the [UMD](/guide/basic/output-format.md#umd) bundle.

:::tip

The module name of the UMD bundle must not conflict with the global variable name.

:::

## Example

- Mount the UMD bundle to `global.MyLibrary`.

```ts title="rslib.config.ts"
export default {
  lib: [
    {
      format: 'umd',
      umdName: 'MyLibrary', // [!code highlight]
    },
  ],
};
```

- Mount the UMD bundle to `global.MyLibrary.Utils`.

```ts title="rslib.config.ts"
export default {
  lib: [
    {
      format: 'umd',
      umdName: ['MyLibrary', 'Utils'], // [!code highlight]
    },
  ],
};
```
