This is the dev preview website. Check out the document at lynxjs.org

Home > @lynx-js/external-bundle-rsbuild-plugin

external-bundle-rsbuild-plugin package

Functions

Function

Description

normalizeBundlePath(bundlePath)

Normalize a public bundle path by removing leading slashes.

pluginExternalBundle(options)

Create a rsbuild plugin for loading external bundles.

This plugin wraps the externals-loading-webpack-plugin and automatically retrieves layer names from the react-rsbuild-plugin via api.useExposed.

Interfaces

Interface

Description

ExternalsPresetContext

Context passed to externals preset resolvers.

ExternalsPresetDefinition

Definition for a named externals preset.

ExternalsPresets

Presets for external bundle dependencies.

PluginExternalBundleOptions

Options for the external-bundle-rsbuild-plugin.

PluginExternalValue

External bundle reference accepted by pluginExternalBundle.

ReactLynxExternalsPresetOptions

Options for the built-in reactlynx externals preset.

Variables

Variable

Description

builtInExternalsPresetDefinitions

Built-in externals preset definitions.

Type Aliases

Type Alias

Description

ExternalsPresetDefinitions

Available externals preset definitions.

PluginExternalConfig

External bundle shorthand accepted by pluginExternalBundle.

When a string is provided, it is treated as bundlePath and the plugin will infer: - libraryName: the external request key - background.sectionPath: the external request key - mainThread.sectionPath: ${request}__main-thread