@module-federation/sdk 0.0.0-next-20240911063502 → 0.0.0-next-20240911074627
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js
CHANGED
|
@@ -33,6 +33,13 @@ const MFModuleType = {
|
|
|
33
33
|
const MODULE_DEVTOOL_IDENTIFIER = '__MF_DEVTOOLS_MODULE_INFO__';
|
|
34
34
|
const ENCODE_NAME_PREFIX = 'ENCODE_NAME_PREFIX';
|
|
35
35
|
const TEMP_DIR = '.federation';
|
|
36
|
+
const MFPrefetchCommon = {
|
|
37
|
+
identifier: 'MFDataPrefetch',
|
|
38
|
+
globalKey: '__PREFETCH__',
|
|
39
|
+
library: 'mf-data-prefetch',
|
|
40
|
+
exportsKey: '__PREFETCH_EXPORTS__',
|
|
41
|
+
fileName: 'bootstrap.js'
|
|
42
|
+
};
|
|
36
43
|
|
|
37
44
|
var ContainerPlugin = /*#__PURE__*/Object.freeze({
|
|
38
45
|
__proto__: null
|
|
@@ -712,6 +719,7 @@ exports.FederationModuleManifest = FederationModuleManifest;
|
|
|
712
719
|
exports.Logger = Logger;
|
|
713
720
|
exports.MANIFEST_EXT = MANIFEST_EXT;
|
|
714
721
|
exports.MFModuleType = MFModuleType;
|
|
722
|
+
exports.MFPrefetchCommon = MFPrefetchCommon;
|
|
715
723
|
exports.MODULE_DEVTOOL_IDENTIFIER = MODULE_DEVTOOL_IDENTIFIER;
|
|
716
724
|
exports.ManifestFileName = ManifestFileName;
|
|
717
725
|
exports.NameTransformMap = NameTransformMap;
|
package/dist/index.esm.js
CHANGED
|
@@ -29,6 +29,13 @@ const MFModuleType = {
|
|
|
29
29
|
const MODULE_DEVTOOL_IDENTIFIER = '__MF_DEVTOOLS_MODULE_INFO__';
|
|
30
30
|
const ENCODE_NAME_PREFIX = 'ENCODE_NAME_PREFIX';
|
|
31
31
|
const TEMP_DIR = '.federation';
|
|
32
|
+
const MFPrefetchCommon = {
|
|
33
|
+
identifier: 'MFDataPrefetch',
|
|
34
|
+
globalKey: '__PREFETCH__',
|
|
35
|
+
library: 'mf-data-prefetch',
|
|
36
|
+
exportsKey: '__PREFETCH_EXPORTS__',
|
|
37
|
+
fileName: 'bootstrap.js'
|
|
38
|
+
};
|
|
32
39
|
|
|
33
40
|
var ContainerPlugin = /*#__PURE__*/Object.freeze({
|
|
34
41
|
__proto__: null
|
|
@@ -700,4 +707,4 @@ function normalizeOptions(enableDefault, defaultOptions, key) {
|
|
|
700
707
|
};
|
|
701
708
|
}
|
|
702
709
|
|
|
703
|
-
export { BROWSER_LOG_KEY, BROWSER_LOG_VALUE, ENCODE_NAME_PREFIX, EncodedNameTransformMap, FederationModuleManifest, Logger, MANIFEST_EXT, MFModuleType, MODULE_DEVTOOL_IDENTIFIER, ManifestFileName, NameTransformMap, NameTransformSymbol, SEPARATOR, StatsFileName, TEMP_DIR, assert, composeKeyWithSeparator, ContainerPlugin as containerPlugin, ContainerReferencePlugin as containerReferencePlugin, createLink, createScript, createScriptNode, decodeName, encodeName, error, generateExposeFilename, generateShareFilename, generateSnapshotFromManifest, getProcessEnv, getResourceUrl, inferAutoPublicPath, isBrowserEnv, isDebugMode, isManifestProvider, isStaticResourcesEqual, loadScript, loadScriptNode, logger, ModuleFederationPlugin as moduleFederationPlugin, normalizeOptions, parseEntry, safeToString, safeWrapper, SharePlugin as sharePlugin, simpleJoinRemoteEntry, warn };
|
|
710
|
+
export { BROWSER_LOG_KEY, BROWSER_LOG_VALUE, ENCODE_NAME_PREFIX, EncodedNameTransformMap, FederationModuleManifest, Logger, MANIFEST_EXT, MFModuleType, MFPrefetchCommon, MODULE_DEVTOOL_IDENTIFIER, ManifestFileName, NameTransformMap, NameTransformSymbol, SEPARATOR, StatsFileName, TEMP_DIR, assert, composeKeyWithSeparator, ContainerPlugin as containerPlugin, ContainerReferencePlugin as containerReferencePlugin, createLink, createScript, createScriptNode, decodeName, encodeName, error, generateExposeFilename, generateShareFilename, generateSnapshotFromManifest, getProcessEnv, getResourceUrl, inferAutoPublicPath, isBrowserEnv, isDebugMode, isManifestProvider, isStaticResourcesEqual, loadScript, loadScriptNode, logger, ModuleFederationPlugin as moduleFederationPlugin, normalizeOptions, parseEntry, safeToString, safeWrapper, SharePlugin as sharePlugin, simpleJoinRemoteEntry, warn };
|
package/dist/src/constant.d.ts
CHANGED
|
@@ -23,3 +23,10 @@ export declare const MFModuleType: {
|
|
|
23
23
|
export declare const MODULE_DEVTOOL_IDENTIFIER = "__MF_DEVTOOLS_MODULE_INFO__";
|
|
24
24
|
export declare const ENCODE_NAME_PREFIX = "ENCODE_NAME_PREFIX";
|
|
25
25
|
export declare const TEMP_DIR = ".federation";
|
|
26
|
+
export declare const MFPrefetchCommon: {
|
|
27
|
+
identifier: string;
|
|
28
|
+
globalKey: string;
|
|
29
|
+
library: string;
|
|
30
|
+
exportsKey: string;
|
|
31
|
+
fileName: string;
|
|
32
|
+
};
|
|
@@ -40,7 +40,7 @@ export type UmdNamedDefine = boolean;
|
|
|
40
40
|
/**
|
|
41
41
|
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
|
42
42
|
*/
|
|
43
|
-
export type ExternalsType = 'var' | 'module' | 'assign' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | 'promise' | 'import' | 'script' | '
|
|
43
|
+
export type ExternalsType = 'var' | 'module' | 'assign' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | 'promise' | 'import' | 'script' | 'node-commonjs';
|
|
44
44
|
/**
|
|
45
45
|
* Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
|
|
46
46
|
*/
|
|
@@ -65,6 +65,10 @@ export type Shared = (SharedItem | SharedObject)[] | SharedObject;
|
|
|
65
65
|
* A module that should be shared in the share scope.
|
|
66
66
|
*/
|
|
67
67
|
export type SharedItem = string;
|
|
68
|
+
/**
|
|
69
|
+
* Enable Data Prefetch
|
|
70
|
+
*/
|
|
71
|
+
export type DataPrefetch = boolean;
|
|
68
72
|
export interface AdditionalDataOptions {
|
|
69
73
|
stats: Stats;
|
|
70
74
|
manifest?: Manifest;
|
|
@@ -174,6 +178,7 @@ export interface ModuleFederationPluginOptions {
|
|
|
174
178
|
dev?: boolean | PluginDevOptions;
|
|
175
179
|
dts?: boolean | PluginDtsOptions;
|
|
176
180
|
async?: boolean | AsyncBoundaryOptions;
|
|
181
|
+
dataPrefetch?: DataPrefetch;
|
|
177
182
|
virtualRuntimeEntry?: boolean;
|
|
178
183
|
experiments?: {
|
|
179
184
|
federationRuntime?: false | 'hoisted';
|