For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/packages/external-bundle-rsbuild-plugin/interfaces/PluginExternalBundleOptions.md.
Lynx
  • English
  • Interface: PluginExternalBundleOptions

    Options for the external-bundle-rsbuild-plugin.

    Extends

    • Pick<ExternalsLoadingPluginOptions, "globalObject" | "timeout" | "retries">

    Properties

    externalBundleRoot?

    optional externalBundleRoot?: string

    Root directory that stores project-owned external bundles referenced by bundlePath.

    pluginExternalBundle uses this directory for both development serving and build-time asset emission. Prefer setting this explicitly when external bundles are built into a separate output folder, such as dist-external-bundle.


    externals?

    optional externals?: Record<string, PluginExternalConfig>

    Additional explicit externals to load.


    externalsPresetDefinitions?

    optional externalsPresetDefinitions?: ExternalsPresetDefinitions

    Definitions for custom externals presets enabled by externalsPresets.

    Use this to add business-specific presets such as lynxUi, or to extend a built-in preset through extends.


    externalsPresets?

    optional externalsPresets?: ExternalsPresets

    Presets for external libraries.

    Same as https://rspack.rs/config/externals#externalspresets but for Lynx.


    globalObject?

    optional globalObject?: "lynx" | "globalThis"

    This option indicates what global object will be used to mount the library.

    In Lynx, the library will be mounted to lynx[Symbol.for("__LYNX_EXTERNAL_GLOBAL__")] by default.

    If you have enabled share js context and want to reuse the library by mounting to the global object, you can set this option to 'globalThis'.

    Default

    'lynx'

    Inherited from

    Pick.globalObject


    retries?

    optional retries?: number

    The number of additional attempts when fetching the external bundle times out (response.code === -2).

    Default Value

    0

    Inherited from

    Pick.retries


    timeout?

    optional timeout?: number

    The timeout in milliseconds for loading the externals.

    Default Value

    2000

    Inherited from

    Pick.timeout

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.