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

Rslib config shape accepted by `defineExternalBundleRslibConfig`.

## Extends

- `LibConfig`

## Properties

### autoExtension?

> `optional` **autoExtension?**: `boolean`

Whether to automatically set the file extension based on [format](#format) option in the JavaScript output files.

#### Default Value

`true`

#### See

[https://rslib.rs/config/lib/auto-extension](https://rslib.rs/config/lib/auto-extension)

#### Inherited from

`LibConfig.autoExtension`

***

### ~~autoExternal?~~

> `optional` **autoExternal?**: `AutoExternal`

Whether to automatically externalize dependencies of different dependency types and do not bundle them.

#### Deprecated

Use `output.autoExternal` instead.

#### Default Value

`true` when [format](#format) is `cjs` or `esm`, `false` when [format](#format) is `umd` or `mf`.

#### See

[https://rslib.rs/config/lib/auto-external](https://rslib.rs/config/lib/auto-external)

#### Inherited from

`LibConfig.autoExternal`

***

### banner?

> `optional` **banner?**: `BannerAndFooter`

Inject content into the top of each JavaScript, CSS or declaration file.

#### Default Value

`{}`

#### See

[https://rslib.rs/config/lib/banner](https://rslib.rs/config/lib/banner)

#### Inherited from

`LibConfig.banner`

***

### bundle?

> `optional` **bundle?**: `boolean`

Whether to bundle the library.

#### Default Value

`true`

#### See

[https://rslib.rs/config/lib/bundle](https://rslib.rs/config/lib/bundle)

#### Inherited from

`LibConfig.bundle`

***

### dev?

> `optional` **dev?**: `Pick`\<`DevConfig`, `AllowedEnvironmentDevKeys`>

Options for local development.

#### Inherited from

`LibConfig.dev`

***

### dts?

> `optional` **dts?**: `Dts`

Configure the generation of the TypeScript declaration files.

#### Default Value

`false`

#### See

[https://rslib.rs/config/lib/dts](https://rslib.rs/config/lib/dts)

#### Inherited from

`LibConfig.dts`

***

### experiments?

> `optional` **experiments?**: `LibExperiments`

Options for experimental features.

#### Default Value

`{}`

#### See

[https://rslib.rs/config/lib/experiments](https://rslib.rs/config/lib/experiments)

#### Inherited from

`LibConfig.experiments`

***

### externalHelpers?

> `optional` **externalHelpers?**: `boolean`

Whether to import SWC helper functions from `@swc/helpers` instead of inlining them.

#### Default Value

`false`

#### See

[https://rslib.rs/config/lib/external-helpers](https://rslib.rs/config/lib/external-helpers)

#### Inherited from

`LibConfig.externalHelpers`

***

### footer?

> `optional` **footer?**: `BannerAndFooter`

Inject content into the bottom of each JavaScript, CSS or declaration file.

#### Default Value

`{}`

#### See

[https://rslib.rs/config/lib/footer](https://rslib.rs/config/lib/footer)

#### Inherited from

`LibConfig.footer`

***

### format?

> `optional` **format?**: `Format`

Output format for the generated JavaScript files.

#### Default Value

`'esm'`

#### See

[https://rslib.rs/config/lib/format](https://rslib.rs/config/lib/format)

#### Inherited from

`LibConfig.format`

***

### html?

> `optional` **html?**: `HtmlConfig`

Options for HTML generation.

#### Inherited from

`LibConfig.html`

***

### id?

> `optional` **id?**: `string`

The unique identifier of the library.

#### Default Value

`undefined`

#### See

[https://rslib.rs/config/lib/id](https://rslib.rs/config/lib/id)

#### Inherited from

`LibConfig.id`

***

### moduleFederation?

> `optional` **moduleFederation?**: `ModuleFederationConfig`

Options for module federation.

#### Inherited from

`LibConfig.moduleFederation`

***

### outBase?

> `optional` **outBase?**: `string`

The base directory of the output files.

#### Default Value

`undefined`

#### See

[https://rslib.rs/config/lib/out-base](https://rslib.rs/config/lib/out-base)

#### Inherited from

`LibConfig.outBase`

***

### output?

> `optional` **output?**: [`OutputConfig`](/next/api/packages/lynx-bundle-rslib-config/type-aliases/OutputConfig.md)

#### Inherit Doc

#### Overrides

`LibConfig.output`

***

### performance?

> `optional` **performance?**: `PerformanceConfig`

Options for build performance and runtime performance.

#### Inherited from

`LibConfig.performance`

***

### plugins?

> `optional` **plugins?**: `RsbuildPlugins`

Configure Rsbuild plugins.

#### Inherited from

`LibConfig.plugins`

***

### redirect?

> `optional` **redirect?**: `Redirect`

Configure the redirect of the import paths, applicable [bundle](#bundle) is set to `false`.

#### Default Value

`{}`

#### See

[https://rslib.rs/config/lib/redirect](https://rslib.rs/config/lib/redirect)

#### Inherited from

`LibConfig.redirect`

***

### resolve?

> `optional` **resolve?**: `ResolveConfig`

Options for module resolution.

#### Inherited from

`LibConfig.resolve`

***

### security?

> `optional` **security?**: `SecurityConfig`

Options for Web security.

#### Inherited from

`LibConfig.security`

***

### server?

> `optional` **server?**: `Pick`\<`ServerConfig`, `"publicDir"` | `"serveAssets"`>

Configure public directories and build output serving for this environment.
Other server options are shared across environments.

#### Inherited from

`LibConfig.server`

***

### shims?

> `optional` **shims?**: `Shims`

Configure the shims for CommonJS and ESM output.

#### Default Value

```js
const defaultShims = {
  cjs: {
    'import.meta.url': true,
    'import.meta.dirname': true,
    'import.meta.filename': true,
  },
  esm: {
    __filename: false,
    __dirname: false,
    require: false,
  },
};
```

#### See

[https://rslib.rs/config/lib/shims](https://rslib.rs/config/lib/shims)

#### Inherited from

`LibConfig.shims`

***

### source?

> `optional` **source?**: `SourceConfig`

Options for input source code.

#### Inherited from

`LibConfig.source`

***

### splitChunks?

> `optional` **splitChunks?**: `false` | `SplitChunksConfig`

Options for chunk splitting.

#### Inherited from

`LibConfig.splitChunks`

***

### syntax?

> `optional` **syntax?**: `Syntax`

Configure the syntax to which JavaScript and CSS will be downgraded.

#### Default Value

`'esnext'`

#### See

[https://rslib.rs/config/lib/syntax](https://rslib.rs/config/lib/syntax)

#### Inherited from

`LibConfig.syntax`

***

### tools?

> `optional` **tools?**: `ToolsConfig`

Options for the low-level tools.

#### Inherited from

`LibConfig.tools`

***

### umdName?

> `optional` **umdName?**: `LibraryName`

The export name of the UMD bundle.

#### Default Value

`undefined`

#### See

[https://rslib.rs/config/lib/umd-name](https://rslib.rs/config/lib/umd-name)

#### Inherited from

`LibConfig.umdName`

***

### wasm?

> `optional` **wasm?**: `Wasm`

Configure how Rslib handles `.wasm` modules. Set to `false` to leave
ESM `.wasm` imports exactly as written in the source.

This option can only be configured when `format` is `'esm'`.

#### Default Value

`{ mode: 'compile' }` when `bundle` is `true`; `{ mode: 'preserve' }` when `bundle` is `false`.

#### See

[https://rslib.rs/config/lib/wasm](https://rslib.rs/config/lib/wasm)

#### Inherited from

`LibConfig.wasm`
