@rspack-canary/core 1.6.5-canary-83f58863-20251120092333 → 1.6.5-canary-480f74ac-20251120174032
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/container/ModuleFederationManifestPlugin.d.ts +2 -9
- package/dist/container/ModuleFederationPlugin.d.ts +1 -16
- package/dist/exports.d.ts +0 -11
- package/dist/index.js +243 -608
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- package/dist/sharing/ConsumeSharedPlugin.d.ts +0 -10
- package/dist/sharing/ProvideSharedPlugin.d.ts +0 -14
- package/dist/sharing/SharePlugin.d.ts +0 -29
- package/dist/sharing/utils.d.ts +0 -1
- package/package.json +2 -2
- package/dist/sharing/CollectShareEntryPlugin.d.ts +0 -22
- package/dist/sharing/IndependentSharePlugin.d.ts +0 -37
- package/dist/sharing/OptimizeDependencyReferencedExportsPlugin.d.ts +0 -14
- package/dist/sharing/ShareContainerPlugin.d.ts +0 -23
- package/dist/sharing/TreeShakeSharePlugin.d.ts +0 -17
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
2
|
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
3
|
import type { Compiler } from "../Compiler";
|
|
4
|
-
import { type ModuleFederationPluginOptions } from "./ModuleFederationPlugin";
|
|
5
4
|
export type RemoteAliasMap = Record<string, {
|
|
6
5
|
name: string;
|
|
7
6
|
entry?: string;
|
|
@@ -16,7 +15,7 @@ export type ManifestSharedOption = {
|
|
|
16
15
|
requiredVersion?: string;
|
|
17
16
|
singleton?: boolean;
|
|
18
17
|
};
|
|
19
|
-
type
|
|
18
|
+
export type ModuleFederationManifestPluginOptions = {
|
|
20
19
|
name?: string;
|
|
21
20
|
globalName?: string;
|
|
22
21
|
filePath?: string;
|
|
@@ -26,11 +25,6 @@ type InternalManifestPluginOptions = {
|
|
|
26
25
|
exposes?: ManifestExposeOption[];
|
|
27
26
|
shared?: ManifestSharedOption[];
|
|
28
27
|
};
|
|
29
|
-
export type ModuleFederationManifestPluginOptions = boolean | Pick<InternalManifestPluginOptions, "disableAssetsAnalyze" | "filePath" | "fileName">;
|
|
30
|
-
export declare function getFileName(manifestOptions: ModuleFederationManifestPluginOptions): {
|
|
31
|
-
statsFileName: string;
|
|
32
|
-
manifestFileName: string;
|
|
33
|
-
};
|
|
34
28
|
/**
|
|
35
29
|
* JS-side post-processing plugin: reads mf-manifest.json and mf-stats.json, executes additionalData callback and merges/overwrites manifest.
|
|
36
30
|
* To avoid cross-NAPI callback complexity, this plugin runs at the afterProcessAssets stage to ensure Rust-side MfManifestPlugin has already output its artifacts.
|
|
@@ -38,7 +32,6 @@ export declare function getFileName(manifestOptions: ModuleFederationManifestPlu
|
|
|
38
32
|
export declare class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
|
|
39
33
|
name: BuiltinPluginName;
|
|
40
34
|
private opts;
|
|
41
|
-
constructor(opts:
|
|
35
|
+
constructor(opts: ModuleFederationManifestPluginOptions);
|
|
42
36
|
raw(compiler: Compiler): BuiltinPlugin;
|
|
43
37
|
}
|
|
44
|
-
export {};
|
|
@@ -1,30 +1,15 @@
|
|
|
1
1
|
import type { Compiler } from "../Compiler";
|
|
2
|
-
import type { ExternalsType } from "../config";
|
|
3
2
|
import { type ModuleFederationManifestPluginOptions } from "./ModuleFederationManifestPlugin";
|
|
4
3
|
import type { ModuleFederationPluginV1Options } from "./ModuleFederationPluginV1";
|
|
5
4
|
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, "enhanced"> {
|
|
6
5
|
runtimePlugins?: RuntimePlugins;
|
|
7
6
|
implementation?: string;
|
|
8
7
|
shareStrategy?: "version-first" | "loaded-first";
|
|
9
|
-
|
|
10
|
-
independentShareDir?: string;
|
|
11
|
-
independentShareFilePath?: string;
|
|
12
|
-
manifest?: ModuleFederationManifestPluginOptions;
|
|
8
|
+
manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, "remoteAliasMap" | "globalName" | "name" | "exposes" | "shared">;
|
|
13
9
|
}
|
|
14
10
|
export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
|
|
15
11
|
export declare class ModuleFederationPlugin {
|
|
16
12
|
private _options;
|
|
17
|
-
private _independentSharePlugin?;
|
|
18
13
|
constructor(_options: ModuleFederationPluginOptions);
|
|
19
14
|
apply(compiler: Compiler): void;
|
|
20
15
|
}
|
|
21
|
-
interface RemoteInfo {
|
|
22
|
-
alias: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
entry?: string;
|
|
25
|
-
externalType: ExternalsType;
|
|
26
|
-
shareScope: string;
|
|
27
|
-
}
|
|
28
|
-
type RemoteInfos = Record<string, RemoteInfo[]>;
|
|
29
|
-
export declare function getRemoteInfos(options: ModuleFederationPluginOptions): RemoteInfos;
|
|
30
|
-
export {};
|
package/dist/exports.d.ts
CHANGED
|
@@ -116,25 +116,14 @@ export declare const container: {
|
|
|
116
116
|
ModuleFederationPlugin: typeof ModuleFederationPlugin;
|
|
117
117
|
ModuleFederationPluginV1: typeof ModuleFederationPluginV1;
|
|
118
118
|
};
|
|
119
|
-
import { CollectShareEntryPlugin } from "./sharing/CollectShareEntryPlugin";
|
|
120
119
|
import { ConsumeSharedPlugin } from "./sharing/ConsumeSharedPlugin";
|
|
121
|
-
import { OptimizeDependencyReferencedExportsPlugin } from "./sharing/OptimizeDependencyReferencedExportsPlugin";
|
|
122
120
|
import { ProvideSharedPlugin } from "./sharing/ProvideSharedPlugin";
|
|
123
|
-
import { ShareContainerPlugin } from "./sharing/ShareContainerPlugin";
|
|
124
121
|
import { SharePlugin } from "./sharing/SharePlugin";
|
|
125
|
-
import { TreeshakeSharePlugin } from "./sharing/TreeShakeSharePlugin";
|
|
126
|
-
export type { CollectShareEntryPluginOptions } from "./sharing/CollectShareEntryPlugin";
|
|
127
122
|
export type { ConsumeSharedPluginOptions, Consumes, ConsumesConfig, ConsumesItem, ConsumesObject } from "./sharing/ConsumeSharedPlugin";
|
|
128
123
|
export type { ProvideSharedPluginOptions, Provides, ProvidesConfig, ProvidesItem, ProvidesObject } from "./sharing/ProvideSharedPlugin";
|
|
129
|
-
export type { ShareContainerPluginOptions } from "./sharing/ShareContainerPlugin";
|
|
130
124
|
export type { Shared, SharedConfig, SharedItem, SharedObject, SharePluginOptions } from "./sharing/SharePlugin";
|
|
131
|
-
export type { TreeshakeSharePluginOptions } from "./sharing/TreeShakeSharePlugin";
|
|
132
125
|
export declare const sharing: {
|
|
133
126
|
ProvideSharedPlugin: typeof ProvideSharedPlugin;
|
|
134
|
-
CollectShareEntryPlugin: typeof CollectShareEntryPlugin;
|
|
135
|
-
TreeshakeSharePlugin: typeof TreeshakeSharePlugin;
|
|
136
|
-
ShareContainerPlugin: typeof ShareContainerPlugin;
|
|
137
|
-
OptimizeDependencyReferencedExportsPlugin: typeof OptimizeDependencyReferencedExportsPlugin;
|
|
138
127
|
ConsumeSharedPlugin: typeof ConsumeSharedPlugin;
|
|
139
128
|
SharePlugin: typeof SharePlugin;
|
|
140
129
|
};
|