mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 14:21:00 +00:00
49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
import { ModuleFederationPluginOptions } from "../types/index.mjs";
|
|
import { Compiler, container } from "webpack";
|
|
|
|
//#region src/plugins/UniversalFederationPlugin.d.ts
|
|
/**
|
|
* Interface for NodeFederationOptions
|
|
* @property {boolean} isServer - Indicates if the server is running
|
|
* @property {string} [promiseBaseURI] - The base URI for the promise
|
|
* @property {boolean} [debug] - Indicates if debug mode is enabled
|
|
*/
|
|
interface NodeFederationOptions extends ModuleFederationPluginOptions {
|
|
isServer: boolean;
|
|
promiseBaseURI?: string;
|
|
debug?: boolean;
|
|
useRuntimePlugin?: boolean;
|
|
}
|
|
/**
|
|
* Interface for NodeFederationContext
|
|
* @property {typeof container.ModuleFederationPlugin} [ModuleFederationPlugin] - The ModuleFederationPlugin from webpack container
|
|
*/
|
|
interface NodeFederationContext {
|
|
ModuleFederationPlugin?: typeof container.ModuleFederationPlugin;
|
|
}
|
|
/**
|
|
* Class representing a UniversalFederationPlugin
|
|
*/
|
|
declare class UniversalFederationPlugin {
|
|
private _options;
|
|
private context;
|
|
private name;
|
|
/**
|
|
* Create a UniversalFederationPlugin
|
|
* @param {NodeFederationOptions} options - The options for the plugin
|
|
* @param {NodeFederationContext} context - The context for the plugin
|
|
*/
|
|
constructor(options: NodeFederationOptions, context: NodeFederationContext);
|
|
private updateCompilerOptions;
|
|
/**
|
|
* Apply the plugin to the compiler
|
|
* @param {Compiler} compiler - The webpack compiler
|
|
*/
|
|
apply(compiler: Compiler): void;
|
|
}
|
|
/**
|
|
* Exporting UniversalFederationPlugin as default
|
|
*/
|
|
//#endregion
|
|
export { UniversalFederationPlugin as default };
|
|
//# sourceMappingURL=UniversalFederationPlugin.d.mts.map
|