import type { moduleFederationPlugin } from '@module-federation/sdk'; import { NormalModuleReplacementPlugin as RspackNormalModuleReplacementPlugin } from '@rspack/core'; export type ModuleFederationLibrary = { type: string; name: string; }; export type WorkspaceLibrary = { name: string; root: string; importKey: string | undefined; }; export type SharedWorkspaceLibraryConfig = { getAliases: () => Record; getLibraries: (projectRoot: string, eager?: boolean) => Record; getReplacementPlugin: () => InstanceType | import('webpack').NormalModuleReplacementPlugin; }; export type Remotes = Array; export interface SharedLibraryConfig { singleton?: boolean; strictVersion?: boolean; requiredVersion?: false | string; eager?: boolean; } export type SharedFunction = (libraryName: string, sharedConfig: SharedLibraryConfig) => undefined | false | SharedLibraryConfig; export type AdditionalSharedConfig = Array; export interface ModuleFederationConfig { name: string; remotes?: Remotes; library?: ModuleFederationLibrary; exposes?: Record; shared?: SharedFunction; additionalShared?: AdditionalSharedConfig; /** * `nxRuntimeLibraryControlPlugin` is a runtime module federation plugin to ensure * that shared libraries are resolved from a remote with live reload capabilities. * If you run into any issues with loading shared libraries, try disabling this option. */ disableNxRuntimeLibraryControlPlugin?: boolean; } export type NxModuleFederationConfigOverride = Omit; export type WorkspaceLibrarySecondaryEntryPoint = { name: string; path: string; }; //# sourceMappingURL=index.d.ts.map