@openshift-console/dynamic-plugin-sdk-webpack
Version:
Provides webpack ConsoleRemotePlugin used to build all dynamic plugin assets.
29 lines (28 loc) • 1.2 kB
TypeScript
type SharedModuleMetadata = Partial<{
/**
* If `true`, only a single version of the module can be loaded at runtime.
*
* @default false
*/
singleton: boolean;
/**
* If `true`, plugins will provide their own fallback version of the module.
*
* The fallback module will be loaded when a matching module is not found within
* the Console shared scope object. If the given module is declared as singleton
* and is already loaded, the fallback module will not load.
*
* @default true
*/
allowFallback: boolean;
}>;
/**
* Modules shared between the Console application and its dynamic plugins.
*/
export declare const sharedPluginModules: readonly ["@openshift-console/dynamic-plugin-sdk", "@openshift-console/dynamic-plugin-sdk-internal", "react", "react-i18next", "react-redux", "react-router", "react-router-dom", "react-router-dom-v5-compat", "redux", "redux-thunk"];
export type SharedModuleNames = typeof sharedPluginModules[number];
/**
* Retrieve full metadata for the given shared module.
*/
export declare const getSharedModuleMetadata: (moduleName: SharedModuleNames) => Required<SharedModuleMetadata>;
export {};