@module-federation/sdk 0.0.0-next-20240808024406 → 0.0.0-next-20240808065005

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
@@ -31,6 +31,13 @@ const MFModuleType = {
31
31
  const MODULE_DEVTOOL_IDENTIFIER = '__MF_DEVTOOLS_MODULE_INFO__';
32
32
  const ENCODE_NAME_PREFIX = 'ENCODE_NAME_PREFIX';
33
33
  const TEMP_DIR = '.federation';
34
+ const MFPrefetchCommon = {
35
+ identifier: 'MFDataPrefetch',
36
+ globalKey: '__PREFETCH__',
37
+ library: 'mf-data-prefetch',
38
+ exportsKey: '__PREFETCH_EXPORTS__',
39
+ fileName: 'bootstrap.js'
40
+ };
34
41
 
35
42
  var ContainerPlugin = /*#__PURE__*/Object.freeze({
36
43
  __proto__: null
@@ -710,6 +717,7 @@ exports.FederationModuleManifest = FederationModuleManifest;
710
717
  exports.Logger = Logger;
711
718
  exports.MANIFEST_EXT = MANIFEST_EXT;
712
719
  exports.MFModuleType = MFModuleType;
720
+ exports.MFPrefetchCommon = MFPrefetchCommon;
713
721
  exports.MODULE_DEVTOOL_IDENTIFIER = MODULE_DEVTOOL_IDENTIFIER;
714
722
  exports.ManifestFileName = ManifestFileName;
715
723
  exports.NameTransformMap = NameTransformMap;
package/dist/index.esm.js CHANGED
@@ -27,6 +27,13 @@ const MFModuleType = {
27
27
  const MODULE_DEVTOOL_IDENTIFIER = '__MF_DEVTOOLS_MODULE_INFO__';
28
28
  const ENCODE_NAME_PREFIX = 'ENCODE_NAME_PREFIX';
29
29
  const TEMP_DIR = '.federation';
30
+ const MFPrefetchCommon = {
31
+ identifier: 'MFDataPrefetch',
32
+ globalKey: '__PREFETCH__',
33
+ library: 'mf-data-prefetch',
34
+ exportsKey: '__PREFETCH_EXPORTS__',
35
+ fileName: 'bootstrap.js'
36
+ };
30
37
 
31
38
  var ContainerPlugin = /*#__PURE__*/Object.freeze({
32
39
  __proto__: null
@@ -698,4 +705,4 @@ function normalizeOptions(enableDefault, defaultOptions, key) {
698
705
  };
699
706
  }
700
707
 
701
- 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, safeWrapper, SharePlugin as sharePlugin, simpleJoinRemoteEntry, warn };
708
+ 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, safeWrapper, SharePlugin as sharePlugin, simpleJoinRemoteEntry, warn };
@@ -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
+ };
@@ -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;
@@ -170,6 +174,7 @@ export interface ModuleFederationPluginOptions {
170
174
  dev?: boolean | PluginDevOptions;
171
175
  dts?: boolean | PluginDtsOptions;
172
176
  async?: boolean | AsyncBoundaryOptions;
177
+ dataPrefetch?: DataPrefetch;
173
178
  }
174
179
  /**
175
180
  * Modules that should be exposed by this container. Property names are used as public paths.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/sdk",
3
- "version": "0.0.0-next-20240808024406",
3
+ "version": "0.0.0-next-20240808065005",
4
4
  "license": "MIT",
5
5
  "description": "A sdk for support module federation",
6
6
  "keywords": [