@module-federation/enhanced
Version:
This package provides enhanced features for module federation.
41 lines (39 loc) • 1.71 kB
JavaScript
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const require_runtime = require('../../_virtual/_rolldown/runtime.js');
let _module_federation_sdk_normalize_webpack_path = require("@module-federation/sdk/normalize-webpack-path");
//#region src/lib/container/ContainerEntryDependency.ts
const makeSerializable = require((0, _module_federation_sdk_normalize_webpack_path.normalizeWebpackPath)("webpack/lib/util/makeSerializable"));
const { Dependency } = require((0, _module_federation_sdk_normalize_webpack_path.normalizeWebpackPath)("webpack"));
var ContainerEntryDependency = class extends Dependency {
/**
* @param {string} name entry name
* @param {[string, ExposeOptions][]} exposes list of exposed modules
* @param {string|string[]} shareScope name of the share scope
* @param {string[]} injectRuntimeEntry the path of injectRuntime file.
* @param {containerPlugin.ContainerPluginOptions['dataPrefetch']} dataPrefetch whether enable dataPrefetch
*/
constructor(name, exposes, shareScope, injectRuntimeEntry, dataPrefetch) {
super();
this.name = name;
this.exposes = exposes;
this.shareScope = shareScope;
this.injectRuntimeEntry = injectRuntimeEntry;
this.dataPrefetch = dataPrefetch;
}
/**
* @returns {string | null} an identifier to merge equal requests
*/
getResourceIdentifier() {
return `container-entry-${this.name}`;
}
get type() {
return "container entry";
}
get category() {
return "esm";
}
};
makeSerializable(ContainerEntryDependency, "enhanced/lib/container/ContainerEntryDependency");
//#endregion
exports.default = ContainerEntryDependency;
//# sourceMappingURL=ContainerEntryDependency.js.map