@rspack-canary/core 1.7.1-canary-cf4486a4-20260104102432 → 1.7.1-canary-47901fb5-20260104173636

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.
@@ -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 InternalManifestPluginOptions = {
18
+ export type ModuleFederationManifestPluginOptions = {
20
19
  name?: string;
21
20
  globalName?: string;
22
21
  filePath?: string;
@@ -26,19 +25,13 @@ 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.
37
31
  */
38
32
  export declare class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
39
33
  name: BuiltinPluginName;
40
- private rawOpts;
41
- constructor(opts: ModuleFederationPluginOptions);
34
+ private opts;
35
+ constructor(opts: ModuleFederationManifestPluginOptions);
42
36
  raw(compiler: Compiler): BuiltinPlugin;
43
37
  }
44
- export {};
@@ -1,31 +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
- manifest?: ModuleFederationManifestPluginOptions;
10
- injectUsedExports?: boolean;
11
- independentShareDir?: string;
12
- treeshakeSharedExcludePlugins?: string[];
13
- treeshakeSharedPlugins?: string[];
8
+ manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, 'remoteAliasMap' | 'globalName' | 'name' | 'exposes' | 'shared'>;
14
9
  }
15
10
  export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
16
11
  export declare class ModuleFederationPlugin {
17
12
  private _options;
18
- private _treeShakeSharedPlugin?;
19
13
  constructor(_options: ModuleFederationPluginOptions);
20
14
  apply(compiler: Compiler): void;
21
15
  }
22
- interface RemoteInfo {
23
- alias: string;
24
- name?: string;
25
- entry?: string;
26
- externalType: ExternalsType;
27
- shareScope: string;
28
- }
29
- type RemoteInfos = Record<string, RemoteInfo[]>;
30
- export declare function getRemoteInfos(options: ModuleFederationPluginOptions): RemoteInfos;
31
- export {};
package/dist/exports.d.ts CHANGED
@@ -125,14 +125,11 @@ export declare const container: {
125
125
  import { ConsumeSharedPlugin } from './sharing/ConsumeSharedPlugin';
126
126
  import { ProvideSharedPlugin } from './sharing/ProvideSharedPlugin';
127
127
  import { SharePlugin } from './sharing/SharePlugin';
128
- import { TreeShakeSharedPlugin } from './sharing/TreeShakeSharedPlugin';
129
128
  export type { ConsumeSharedPluginOptions, Consumes, ConsumesConfig, ConsumesItem, ConsumesObject, } from './sharing/ConsumeSharedPlugin';
130
129
  export type { ProvideSharedPluginOptions, Provides, ProvidesConfig, ProvidesItem, ProvidesObject, } from './sharing/ProvideSharedPlugin';
131
130
  export type { Shared, SharedConfig, SharedItem, SharedObject, SharePluginOptions, } from './sharing/SharePlugin';
132
- export type { TreeshakeSharedPluginOptions } from './sharing/TreeShakeSharedPlugin';
133
131
  export declare const sharing: {
134
132
  ProvideSharedPlugin: typeof ProvideSharedPlugin;
135
- TreeShakeSharedPlugin: typeof TreeShakeSharedPlugin;
136
133
  ConsumeSharedPlugin: typeof ConsumeSharedPlugin;
137
134
  SharePlugin: typeof SharePlugin;
138
135
  };