@rspack-canary/core 1.6.5-canary-886f4882-20251120061913 → 1.6.5-canary-83f58863-20251120092333

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.
@@ -78,7 +78,7 @@ declare class Watchpack extends EventEmitter {
78
78
  aggregatedChanges: Set<string>;
79
79
  aggregatedRemovals: Set<string>;
80
80
 
81
- aggregateTimeout: NodeJS.Timer;
81
+ aggregateTimeout: number;
82
82
  dirWatchers: Watcher[];
83
83
  fileWatchers: Watcher[];
84
84
  /** Last modified times for files by path */
@@ -1,6 +1,7 @@
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";
4
5
  export type RemoteAliasMap = Record<string, {
5
6
  name: string;
6
7
  entry?: string;
@@ -15,7 +16,7 @@ export type ManifestSharedOption = {
15
16
  requiredVersion?: string;
16
17
  singleton?: boolean;
17
18
  };
18
- export type ModuleFederationManifestPluginOptions = {
19
+ type InternalManifestPluginOptions = {
19
20
  name?: string;
20
21
  globalName?: string;
21
22
  filePath?: string;
@@ -25,6 +26,11 @@ export type ModuleFederationManifestPluginOptions = {
25
26
  exposes?: ManifestExposeOption[];
26
27
  shared?: ManifestSharedOption[];
27
28
  };
29
+ export type ModuleFederationManifestPluginOptions = boolean | Pick<InternalManifestPluginOptions, "disableAssetsAnalyze" | "filePath" | "fileName">;
30
+ export declare function getFileName(manifestOptions: ModuleFederationManifestPluginOptions): {
31
+ statsFileName: string;
32
+ manifestFileName: string;
33
+ };
28
34
  /**
29
35
  * JS-side post-processing plugin: reads mf-manifest.json and mf-stats.json, executes additionalData callback and merges/overwrites manifest.
30
36
  * To avoid cross-NAPI callback complexity, this plugin runs at the afterProcessAssets stage to ensure Rust-side MfManifestPlugin has already output its artifacts.
@@ -32,6 +38,7 @@ export type ModuleFederationManifestPluginOptions = {
32
38
  export declare class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
33
39
  name: BuiltinPluginName;
34
40
  private opts;
35
- constructor(opts: ModuleFederationManifestPluginOptions);
41
+ constructor(opts: ModuleFederationPluginOptions);
36
42
  raw(compiler: Compiler): BuiltinPlugin;
37
43
  }
44
+ export {};
@@ -1,15 +1,30 @@
1
1
  import type { Compiler } from "../Compiler";
2
+ import type { ExternalsType } from "../config";
2
3
  import { type ModuleFederationManifestPluginOptions } from "./ModuleFederationManifestPlugin";
3
4
  import type { ModuleFederationPluginV1Options } from "./ModuleFederationPluginV1";
4
5
  export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, "enhanced"> {
5
6
  runtimePlugins?: RuntimePlugins;
6
7
  implementation?: string;
7
8
  shareStrategy?: "version-first" | "loaded-first";
8
- manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, "remoteAliasMap" | "globalName" | "name" | "exposes" | "shared">;
9
+ injectUsedExports?: boolean;
10
+ independentShareDir?: string;
11
+ independentShareFilePath?: string;
12
+ manifest?: ModuleFederationManifestPluginOptions;
9
13
  }
10
14
  export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
11
15
  export declare class ModuleFederationPlugin {
12
16
  private _options;
17
+ private _independentSharePlugin?;
13
18
  constructor(_options: ModuleFederationPluginOptions);
14
19
  apply(compiler: Compiler): void;
15
20
  }
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,14 +116,25 @@ export declare const container: {
116
116
  ModuleFederationPlugin: typeof ModuleFederationPlugin;
117
117
  ModuleFederationPluginV1: typeof ModuleFederationPluginV1;
118
118
  };
119
+ import { CollectShareEntryPlugin } from "./sharing/CollectShareEntryPlugin";
119
120
  import { ConsumeSharedPlugin } from "./sharing/ConsumeSharedPlugin";
121
+ import { OptimizeDependencyReferencedExportsPlugin } from "./sharing/OptimizeDependencyReferencedExportsPlugin";
120
122
  import { ProvideSharedPlugin } from "./sharing/ProvideSharedPlugin";
123
+ import { ShareContainerPlugin } from "./sharing/ShareContainerPlugin";
121
124
  import { SharePlugin } from "./sharing/SharePlugin";
125
+ import { TreeshakeSharePlugin } from "./sharing/TreeShakeSharePlugin";
126
+ export type { CollectShareEntryPluginOptions } from "./sharing/CollectShareEntryPlugin";
122
127
  export type { ConsumeSharedPluginOptions, Consumes, ConsumesConfig, ConsumesItem, ConsumesObject } from "./sharing/ConsumeSharedPlugin";
123
128
  export type { ProvideSharedPluginOptions, Provides, ProvidesConfig, ProvidesItem, ProvidesObject } from "./sharing/ProvideSharedPlugin";
129
+ export type { ShareContainerPluginOptions } from "./sharing/ShareContainerPlugin";
124
130
  export type { Shared, SharedConfig, SharedItem, SharedObject, SharePluginOptions } from "./sharing/SharePlugin";
131
+ export type { TreeshakeSharePluginOptions } from "./sharing/TreeShakeSharePlugin";
125
132
  export declare const sharing: {
126
133
  ProvideSharedPlugin: typeof ProvideSharedPlugin;
134
+ CollectShareEntryPlugin: typeof CollectShareEntryPlugin;
135
+ TreeshakeSharePlugin: typeof TreeshakeSharePlugin;
136
+ ShareContainerPlugin: typeof ShareContainerPlugin;
137
+ OptimizeDependencyReferencedExportsPlugin: typeof OptimizeDependencyReferencedExportsPlugin;
127
138
  ConsumeSharedPlugin: typeof ConsumeSharedPlugin;
128
139
  SharePlugin: typeof SharePlugin;
129
140
  };