For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/api/lynx-bundle-rslib-config.md.
这是开发预览网站。请访问正式文档 lynx-stack.dev

Home > @lynx-js/lynx-bundle-rslib-config

lynx-bundle-rslib-config package

@lynx-js/lynx-bundle-rslib-config is the package that provides the configurations for bundling Lynx bundle with Rslib.

Classes

Class

Description

MainThreadRuntimeWrapperWebpackPlugin

The main-thread runtime wrapper for external bundle.

Functions

Function

Description

defineExternalBundleRslibConfig(userLibConfig, encodeOptions)

Get the rslib config for building Lynx external bundles.

Interfaces

Interface

Description

EncodeOptions

The options for encoding the external bundle.

ExposedLayers

The layer names an external bundle is split by.

ExternalBundleLibConfig

Rslib config shape accepted by defineExternalBundleRslibConfig.

ExternalObject

Object form of an external mapping.

Use this instead of the plain global-name form when the external library is mounted asynchronously (as a Promise) by the consuming application, i.e. the matching pluginExternalBundle external is configured with async: true.

ExternalsPresetDefinition

Definition for a named externals preset.

MainThreadRuntimeWrapperWebpackPluginOptions

The options of MainThreadRuntimeWrapperWebpackPlugin.

Variables

Variable

Description

builtInExternalsPresetDefinitions

Built-in externals preset definitions.

defaultExternalBundleLibConfig

The default lib config for external bundle.

LAYERS

The layer names an entry is split by without a DSL plugin.

reactLynxExternalsPreset

Standard ReactLynx external mappings used by the built-in reactlynx preset.

Type Aliases

Type Alias

Description

Externals

External module to global-name mappings used when building Lynx external bundles.

ExternalsPresetDefinitions

Available externals preset definitions.

ExternalsPresets

Enabled externals presets.

Preset names are resolved from the built-in preset definitions plus any custom definitions passed to defineExternalBundleRslibConfig().

ExternalsPresetValue

How an externals preset is enabled.

true mounts the preset's libraries synchronously. The { async: true } object form mounts them asynchronously (as Promises), for the web target where external bundles are loaded via fetchBundle().then — seeExternalObject.async.

OutputConfig

Output config accepted by Lynx external bundle builds.