@module-federation/manifest
Version:
Provide manifest/stats for webpack/rspack MF project .
38 lines (37 loc) • 1.21 kB
TypeScript
import { StatsExpose, StatsRemote, StatsShared, moduleFederationPlugin } from '@module-federation/sdk';
import type { StatsModule } from 'webpack';
export declare const getExposeName: (exposeKey: string) => string;
export declare function getExposeItem({ exposeKey, name, file, }: {
exposeKey: string;
name: string;
file: {
import: string[];
};
}): StatsExpose;
declare class ModuleHandler {
private _options;
private _bundler;
private _modules;
private _containerManager;
private _remoteManager;
private _sharedManager;
constructor(options: moduleFederationPlugin.ModuleFederationPluginOptions, modules: StatsModule[], { bundler }: {
bundler: 'webpack' | 'rspack';
});
get isRspack(): boolean;
private _handleSharedModule;
private _handleRemoteModule;
private _handleContainerModule;
private _getContainerExposeEntriesFromOptions;
private _initializeExposesFromOptions;
collect(): {
remotes: StatsRemote[];
exposesMap: {
[exposeImportValue: string]: StatsExpose;
};
sharedMap: {
[sharedKey: string]: StatsShared;
};
};
}
export { ModuleHandler };