Interface: PluginExternalBundleOptions
Options for the external-bundle-rsbuild-plugin.
Extends
Pick<ExternalsLoadingPluginOptions,"globalObject"|"timeout"|"retries">
Properties
externalBundleRoot?
optionalexternalBundleRoot?: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?
optionalexternals?:Record<string,PluginExternalConfig>
Additional explicit externals to load.
externalsPresetDefinitions?
optionalexternalsPresetDefinitions?: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?
optionalexternalsPresets?:ExternalsPresets
Presets for external libraries.
Same as https://rspack.rs/config/externals#externalspresets but for Lynx.
globalObject?
optionalglobalObject?:"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
Inherited from
Pick.globalObject
retries?
optionalretries?:number
The number of additional attempts when fetching the external bundle times out (response.code === -2).
Default Value
Inherited from
Pick.retries
timeout?
optionaltimeout?:number
The timeout in milliseconds for loading the externals.
Default Value
Inherited from
Pick.timeout