Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 87 additions & 72 deletions docs/en/api/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,36 @@
"collapsible": true,
"collapsed": true,
"items": [
{
"type": "custom-link",
"label": "builtInExternalsPresetDefinitions",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.builtinexternalspresetdefinitions"
},
{
"type": "custom-link",
"label": "ExternalsPresetContext",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.externalspresetcontext"
},
{
"type": "custom-link",
"label": "ExternalsPresetDefinition",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.externalspresetdefinition"
},
{
"type": "custom-link",
"label": "ExternalsPresetDefinitions",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.externalspresetdefinitions"
},
{
"type": "custom-link",
"label": "ExternalsPresets",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.externalspresets"
},
{
"type": "custom-link",
"label": "normalizeBundlePath",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.normalizebundlepath"
},
{
"type": "custom-link",
"label": "pluginExternalBundle",
Expand All @@ -1157,6 +1187,21 @@
"type": "custom-link",
"label": "PluginExternalBundleOptions",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.pluginexternalbundleoptions"
},
{
"type": "custom-link",
"label": "PluginExternalConfig",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.pluginexternalconfig"
},
{
"type": "custom-link",
"label": "PluginExternalValue",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.pluginexternalvalue"
},
{
"type": "custom-link",
"label": "ReactLynxExternalsPresetOptions",
"link": "/api/rspeedy/external-bundle-rsbuild-plugin.reactlynxexternalspresetoptions"
}
]
},
Expand All @@ -1167,6 +1212,11 @@
"collapsible": true,
"collapsed": true,
"items": [
{
"type": "custom-link",
"label": "builtInExternalsPresetDefinitions",
"link": "/api/rspeedy/lynx-bundle-rslib-config.builtinexternalspresetdefinitions"
},
{
"type": "custom-link",
"label": "defaultExternalBundleLibConfig",
Expand All @@ -1179,98 +1229,63 @@
},
{
"type": "custom-link",
"link": "/api/rspeedy/lynx-bundle-rslib-config.encodeoptions",
"label": "EncodeOptions",
"items": [
{
"type": "custom-link",
"label": "targetSdkVersion",
"link": "/api/rspeedy/lynx-bundle-rslib-config.encodeoptions.targetsdkversion"
}
],
"collapsible": true,
"collapsed": true
"link": "/api/rspeedy/lynx-bundle-rslib-config.encodeoptions"
},
{
"type": "custom-link",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlewebpackplugin",
"label": "ExternalBundleWebpackPlugin",
"items": [
{
"type": "custom-link",
"label": "(constructor)",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlewebpackplugin._constructor_"
},
{
"type": "custom-link",
"label": "apply",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlewebpackplugin.apply"
}
],
"collapsible": true,
"collapsed": true
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlewebpackplugin"
},
{
"type": "custom-link",
"label": "ExternalBundleLibConfig",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlelibconfig"
},
{
"type": "custom-link",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlewebpackpluginoptions",
"label": "ExternalBundleWebpackPluginOptions",
"items": [
{
"type": "custom-link",
"label": "bundleFileName",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlewebpackpluginoptions.bundlefilename"
},
{
"type": "custom-link",
"label": "encode",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlewebpackpluginoptions.encode"
},
{
"type": "custom-link",
"label": "targetSdkVersion",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlewebpackpluginoptions.targetsdkversion"
}
],
"collapsible": true,
"collapsed": true
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalbundlewebpackpluginoptions"
},
{
"type": "custom-link",
"label": "LAYERS",
"link": "/api/rspeedy/lynx-bundle-rslib-config.layers"
"label": "Externals",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externals"
},
{
"type": "custom-link",
"label": "ExternalsPresetDefinition",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalspresetdefinition"
},
{
"type": "custom-link",
"label": "ExternalsPresetDefinitions",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalspresetdefinitions"
},
{
"type": "custom-link",
"label": "ExternalsPresets",
"link": "/api/rspeedy/lynx-bundle-rslib-config.externalspresets"
},
{
"type": "custom-link",
"link": "/api/rspeedy/lynx-bundle-rslib-config.mainthreadruntimewrapperwebpackplugin",
"label": "MainThreadRuntimeWrapperWebpackPlugin",
"items": [
{
"type": "custom-link",
"label": "(constructor)",
"link": "/api/rspeedy/lynx-bundle-rslib-config.mainthreadruntimewrapperwebpackplugin._constructor_"
},
{
"type": "custom-link",
"label": "apply",
"link": "/api/rspeedy/lynx-bundle-rslib-config.mainthreadruntimewrapperwebpackplugin.apply"
}
],
"collapsible": true,
"collapsed": true
"link": "/api/rspeedy/lynx-bundle-rslib-config.mainthreadruntimewrapperwebpackplugin"
},
{
"type": "custom-link",
"link": "/api/rspeedy/lynx-bundle-rslib-config.mainthreadruntimewrapperwebpackpluginoptions",
"label": "MainThreadRuntimeWrapperWebpackPluginOptions",
"items": [
{
"type": "custom-link",
"label": "test",
"link": "/api/rspeedy/lynx-bundle-rslib-config.mainthreadruntimewrapperwebpackpluginoptions.test"
}
],
"collapsible": true,
"collapsed": true
"link": "/api/rspeedy/lynx-bundle-rslib-config.mainthreadruntimewrapperwebpackpluginoptions"
},
{
"type": "custom-link",
"label": "OutputConfig",
"link": "/api/rspeedy/lynx-bundle-rslib-config.outputconfig"
},
{
"type": "custom-link",
"label": "reactLynxExternalsPreset",
"link": "/api/rspeedy/lynx-bundle-rslib-config.reactlynxexternalspreset"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lynx-js/external-bundle-rsbuild-plugin](./external-bundle-rsbuild-plugin.md) &gt; [builtInExternalsPresetDefinitions](./external-bundle-rsbuild-plugin.builtinexternalspresetdefinitions.md)

## builtInExternalsPresetDefinitions variable

Built-in externals preset definitions.

**Signature:**

```typescript
export declare const builtInExternalsPresetDefinitions: ExternalsPresetDefinitions;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lynx-js/external-bundle-rsbuild-plugin](./external-bundle-rsbuild-plugin.md) &gt; [ExternalsPresetContext](./external-bundle-rsbuild-plugin.externalspresetcontext.md)

## ExternalsPresetContext interface

Context passed to externals preset resolvers.

**Signature:**

```typescript
export interface ExternalsPresetContext
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| `rootPath` | `string` | The current Rsbuild project root path. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lynx-js/external-bundle-rsbuild-plugin](./external-bundle-rsbuild-plugin.md) &gt; [ExternalsPresetDefinition](./external-bundle-rsbuild-plugin.externalspresetdefinition.md)

## ExternalsPresetDefinition interface

Definition for a named externals preset.

**Signature:**

```typescript
export interface ExternalsPresetDefinition
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| `extends?` | `string \| string[]` | Other preset names to apply before the current preset. |
| `resolveExternals?` | `(value: boolean \| object, context: ExternalsPresetContext) => ExternalsLoadingPluginOptions['externals']` | Resolve external request mappings contributed by this preset. |
| `resolveManagedAssets?` | `(value: boolean \| object, context: ExternalsPresetContext) => Map<string, string> \| Record<string, string>` | Resolve managed bundle assets contributed by this preset. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lynx-js/external-bundle-rsbuild-plugin](./external-bundle-rsbuild-plugin.md) &gt; [ExternalsPresetDefinitions](./external-bundle-rsbuild-plugin.externalspresetdefinitions.md)

## ExternalsPresetDefinitions type alias

Available externals preset definitions.

**Signature:**

```typescript
export type ExternalsPresetDefinitions = Record<string, ExternalsPresetDefinition>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lynx-js/external-bundle-rsbuild-plugin](./external-bundle-rsbuild-plugin.md) &gt; [ExternalsPresets](./external-bundle-rsbuild-plugin.externalspresets.md)

## ExternalsPresets interface

Presets for external bundle dependencies.

**Signature:**

```typescript
export interface ExternalsPresets
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| `reactlynx?` | `boolean \| ReactLynxExternalsPresetOptions` | Load the ReactLynx runtime bundle and wire its standard module globals. |
| `[presetName: string]` | `boolean \| object \| undefined` | Additional custom preset flags. |
22 changes: 20 additions & 2 deletions docs/en/api/rspeedy/external-bundle-rsbuild-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,29 @@ A rsbuild plugin for loading external bundles using externals-loading-webpack-pl

| Function | Description |
| --- | --- |
| [pluginExternalBundle(options)](./external-bundle-rsbuild-plugin.pluginexternalbundle.md) | <p>Create a rsbuild plugin for loading external bundles.</p><p>This plugin wraps the externals-loading-webpack-plugin and automatically retrieves layer names from the react-rsbuild-plugin via api.useExposed.</p> |
| [normalizeBundlePath(bundlePath)](./external-bundle-rsbuild-plugin.normalizebundlepath.md) | Normalize a public bundle path by removing leading slashes. |
| [pluginExternalBundle(options)](./external-bundle-rsbuild-plugin.pluginexternalbundle.md) | Create a rsbuild plugin for loading external bundles. |

## Interfaces

| Interface | Description |
| --- | --- |
| [ExternalsPresetContext](./external-bundle-rsbuild-plugin.externalspresetcontext.md) | Context passed to externals preset resolvers. |
| [ExternalsPresetDefinition](./external-bundle-rsbuild-plugin.externalspresetdefinition.md) | Definition for a named externals preset. |
| [ExternalsPresets](./external-bundle-rsbuild-plugin.externalspresets.md) | Presets for external bundle dependencies. |
| [PluginExternalBundleOptions](./external-bundle-rsbuild-plugin.pluginexternalbundleoptions.md) | Options for the external-bundle-rsbuild-plugin. |
| [PluginExternalValue](./external-bundle-rsbuild-plugin.pluginexternalvalue.md) | External bundle reference accepted by `pluginExternalBundle`. |
| [ReactLynxExternalsPresetOptions](./external-bundle-rsbuild-plugin.reactlynxexternalspresetoptions.md) | Options for the built-in `reactlynx` externals preset. |

## Type Aliases

| Type Alias | Description |
| --- | --- |
| [PluginExternalBundleOptions](./external-bundle-rsbuild-plugin.pluginexternalbundleoptions.md) | Options for the external-bundle-rsbuild-plugin. |
| [ExternalsPresetDefinitions](./external-bundle-rsbuild-plugin.externalspresetdefinitions.md) | Available externals preset definitions. |
| [PluginExternalConfig](./external-bundle-rsbuild-plugin.pluginexternalconfig.md) | External bundle shorthand accepted by `pluginExternalBundle`. |

## Variables

| Variable | Description |
| --- | --- |
| [builtInExternalsPresetDefinitions](./external-bundle-rsbuild-plugin.builtinexternalspresetdefinitions.md) | Built-in externals preset definitions. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lynx-js/external-bundle-rsbuild-plugin](./external-bundle-rsbuild-plugin.md) &gt; [normalizeBundlePath](./external-bundle-rsbuild-plugin.normalizebundlepath.md)

## normalizeBundlePath() function

Normalize a public bundle path by removing leading slashes.

**Signature:**

```typescript
export declare function normalizeBundlePath(bundlePath: string): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| bundlePath | `string` | The bundle path to normalize. |

**Returns:**

`string`
Loading
Loading