@module-federation/enhanced
Version:
This package provides enhanced features for module federation.
198 lines • 8.1 kB
TypeScript
//#region src/schemas/sharing/ProvideSharedPlugin.d.ts
declare const _default: {
readonly definitions: {
readonly Provides: {
readonly description: "Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.";
readonly anyOf: readonly [{
readonly type: "array";
readonly items: {
readonly description: "Modules that should be provided as shared modules to the share scope.";
readonly anyOf: readonly [{
readonly $ref: "#/definitions/ProvidesItem";
}, {
readonly $ref: "#/definitions/ProvidesObject";
}];
};
}, {
readonly $ref: "#/definitions/ProvidesObject";
}];
};
readonly ProvidesConfig: {
readonly description: "Advanced configuration for modules that should be provided as shared modules to the share scope.";
readonly type: "object";
readonly additionalProperties: false;
readonly properties: {
readonly eager: {
readonly description: "Include the provided module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.";
readonly type: "boolean";
};
readonly shareKey: {
readonly description: "Key in the share scope under which the shared modules should be stored.";
readonly type: "string";
readonly minLength: 1;
};
readonly request: {
readonly description: "Import request to match on";
readonly type: "string";
readonly minLength: 1;
};
readonly shareScope: {
readonly description: "Share scope name.";
readonly anyOf: readonly [{
readonly type: "string";
readonly minLength: 1;
}, {
readonly type: "array";
readonly items: {
readonly type: "string";
readonly minLength: 1;
};
}];
};
readonly requiredVersion: {
readonly description: "Version requirement from module in share scope.";
readonly anyOf: readonly [{
readonly description: "No version requirement check.";
readonly enum: readonly [false];
}, {
readonly description: "Version as string. Can be prefixed with '^' or '~' for minimum matches. Each part of the version should be separated by a dot '.'.";
readonly type: "string";
}];
};
readonly strictVersion: {
readonly description: "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).";
readonly type: "boolean";
};
readonly singleton: {
readonly description: "Allow only a single version of the shared module in share scope (disabled by default).";
readonly type: "boolean";
};
readonly layer: {
readonly description: "Layer in which the shared module should be placed.";
readonly type: "string";
readonly minLength: 1;
};
readonly issuerLayer: {
readonly description: "Layer of the issuer.";
readonly type: "string";
readonly minLength: 1;
};
readonly version: {
readonly description: "Version of the provided module. Will replace lower matching versions, but not higher.";
readonly anyOf: readonly [{
readonly description: "Don't provide a version.";
readonly enum: readonly [false];
}, {
readonly description: "Version as string. Each part of the version should be separated by a dot '.'.";
readonly type: "string";
}];
};
readonly exclude: {
readonly description: "Filter for the shared module.";
readonly $ref: "#/definitions/IncludeExcludeOptions";
};
readonly include: {
readonly description: "Options for including only certain versions or requests of the provided module. Cannot be used with 'exclude'.";
readonly $ref: "#/definitions/IncludeExcludeOptions";
};
readonly allowNodeModulesSuffixMatch: {
readonly description: "Enable reconstructed lookup for node_modules paths for this share item";
readonly type: "boolean";
};
readonly treeShakingMode: {
readonly description: "Tree shaking mode for the shared module.";
readonly type: "string";
readonly enum: readonly ["server-calc", "runtime-infer"];
};
};
};
readonly ProvidesItem: {
readonly description: "Request to a module that should be provided as shared module to the share scope (will be resolved when relative).";
readonly type: "string";
readonly minLength: 1;
};
readonly ProvidesObject: {
readonly description: "Modules that should be provided as shared modules to the share scope. Property names are used as share keys.";
readonly type: "object";
readonly additionalProperties: {
readonly description: "Modules that should be provided as shared modules to the share scope.";
readonly anyOf: readonly [{
readonly $ref: "#/definitions/ProvidesConfig";
}, {
readonly $ref: "#/definitions/ProvidesItem";
}];
};
};
readonly ProvidesList: {
readonly type: "array";
readonly description: "A list of module requests to be provided to the shared scope.";
readonly items: {
readonly type: "string";
};
};
readonly IncludeExcludeOptions: {
readonly type: "object";
readonly properties: {
readonly request: {
readonly anyOf: readonly [{
readonly type: "string";
readonly description: "Request string to match exactly.";
}, {
readonly instanceof: "RegExp";
readonly description: "Regular expression to match the request path.";
}];
};
readonly version: {
readonly type: "string";
readonly description: "Semantic versioning range to match against the module's version.";
};
readonly fallbackVersion: {
readonly type: "string";
readonly description: "Optional specific version string to check against the version range instead of reading package.json.";
};
};
readonly additionalProperties: false;
readonly anyOf: readonly [{
readonly required: readonly ["request"];
}, {
readonly required: readonly ["version"];
}];
};
};
readonly title: "ProvideSharedPluginOptions";
readonly type: "object";
readonly additionalProperties: false;
readonly properties: {
readonly provides: {
readonly $ref: "#/definitions/Provides";
};
readonly shareScope: {
readonly description: "Share scope name used for all provided modules (defaults to 'default').";
readonly anyOf: readonly [{
readonly type: "string";
readonly minLength: 1;
}, {
readonly type: "array";
readonly items: {
readonly type: "string";
readonly minLength: 1;
};
}];
};
readonly experiments: {
readonly description: "Experimental features configuration";
readonly type: "object";
readonly additionalProperties: false;
readonly properties: {
readonly allowNodeModulesSuffixMatch: {
readonly description: "Enable reconstructed lookup for node_modules paths";
readonly type: "boolean";
};
};
};
};
readonly required: readonly ["provides"];
};
//#endregion
export { _default as default };
//# sourceMappingURL=ProvideSharedPlugin.d.ts.map