@module-federation/webpack-bundler-runtime 0.0.0-next-20240411125344 → 0.0.0-next-20240412091739
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 +2 -6
- package/dist/index.esm.js +2 -6
- package/dist/src/types.d.ts +3 -2
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -149,9 +149,7 @@ function consumes(options) {
|
|
|
149
149
|
throw new Error("Federation instance not found!");
|
|
150
150
|
}
|
|
151
151
|
var _moduleToHandlerMapping_id = moduleToHandlerMapping[id], shareKey = _moduleToHandlerMapping_id.shareKey, getter = _moduleToHandlerMapping_id.getter, shareInfo = _moduleToHandlerMapping_id.shareInfo;
|
|
152
|
-
var promise = federationInstance.loadShare(shareKey, {
|
|
153
|
-
customShareInfo: shareInfo
|
|
154
|
-
}).then(function(factory) {
|
|
152
|
+
var promise = federationInstance.loadShare(shareKey, shareInfo).then(function(factory) {
|
|
155
153
|
if (factory === false) {
|
|
156
154
|
return getter();
|
|
157
155
|
}
|
|
@@ -235,9 +233,7 @@ function handleInitialConsumes(options) {
|
|
|
235
233
|
throw new Error("Federation instance not found!");
|
|
236
234
|
}
|
|
237
235
|
var _moduleToHandlerMapping_moduleId = moduleToHandlerMapping[moduleId], shareKey = _moduleToHandlerMapping_moduleId.shareKey, shareInfo = _moduleToHandlerMapping_moduleId.shareInfo;
|
|
238
|
-
return federationInstance.loadShareSync(shareKey,
|
|
239
|
-
customShareInfo: shareInfo
|
|
240
|
-
});
|
|
236
|
+
return federationInstance.loadShareSync(shareKey, shareInfo);
|
|
241
237
|
}
|
|
242
238
|
function installInitialConsumes(options) {
|
|
243
239
|
var moduleToHandlerMapping = options.moduleToHandlerMapping, webpackRequire = options.webpackRequire, installedModules = options.installedModules, initialConsumes = options.initialConsumes;
|
package/dist/index.esm.js
CHANGED
|
@@ -127,9 +127,7 @@ function consumes(options) {
|
|
|
127
127
|
throw new Error("Federation instance not found!");
|
|
128
128
|
}
|
|
129
129
|
var _moduleToHandlerMapping_id = moduleToHandlerMapping[id], shareKey = _moduleToHandlerMapping_id.shareKey, getter = _moduleToHandlerMapping_id.getter, shareInfo = _moduleToHandlerMapping_id.shareInfo;
|
|
130
|
-
var promise = federationInstance.loadShare(shareKey, {
|
|
131
|
-
customShareInfo: shareInfo
|
|
132
|
-
}).then(function(factory) {
|
|
130
|
+
var promise = federationInstance.loadShare(shareKey, shareInfo).then(function(factory) {
|
|
133
131
|
if (factory === false) {
|
|
134
132
|
return getter();
|
|
135
133
|
}
|
|
@@ -213,9 +211,7 @@ function handleInitialConsumes(options) {
|
|
|
213
211
|
throw new Error("Federation instance not found!");
|
|
214
212
|
}
|
|
215
213
|
var _moduleToHandlerMapping_moduleId = moduleToHandlerMapping[moduleId], shareKey = _moduleToHandlerMapping_moduleId.shareKey, shareInfo = _moduleToHandlerMapping_moduleId.shareInfo;
|
|
216
|
-
return federationInstance.loadShareSync(shareKey,
|
|
217
|
-
customShareInfo: shareInfo
|
|
218
|
-
});
|
|
214
|
+
return federationInstance.loadShareSync(shareKey, shareInfo);
|
|
219
215
|
}
|
|
220
216
|
function installInitialConsumes(options) {
|
|
221
217
|
var moduleToHandlerMapping = options.moduleToHandlerMapping, webpackRequire = options.webpackRequire, installedModules = options.installedModules, initialConsumes = options.initialConsumes;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as runtime from '@module-federation/runtime';
|
|
2
|
-
import type { RemoteEntryInitOptions
|
|
2
|
+
import type { RemoteEntryInitOptions } from '@module-federation/runtime/types';
|
|
3
3
|
import { initializeSharing } from './initializeSharing';
|
|
4
4
|
import { attachShareScopeMap } from './attachShareScopeMap';
|
|
5
5
|
import { initContainerEntry } from './initContainerEntry';
|
|
6
6
|
type ExcludeUndefined<T> = T extends undefined ? never : T;
|
|
7
|
-
type Shared = InitOptions['shared'];
|
|
8
7
|
type NonUndefined<T = Shared> = ExcludeUndefined<T>;
|
|
9
8
|
type InitOptions = Parameters<typeof runtime.init>[0];
|
|
9
|
+
type Shared = InitOptions['shared'];
|
|
10
|
+
type SharedConfig = NonUndefined<NonUndefined[string]['shareConfig']>;
|
|
10
11
|
type ModuleCache = runtime.FederationHost['moduleCache'];
|
|
11
12
|
type InferModule<T> = T extends Map<string, infer U> ? U : never;
|
|
12
13
|
type InferredModule = InferModule<ModuleCache>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"public": true,
|
|
3
3
|
"name": "@module-federation/webpack-bundler-runtime",
|
|
4
|
-
"version": "0.0.0-next-
|
|
4
|
+
"version": "0.0.0-next-20240412091739",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Module Federation Runtime for webpack",
|
|
7
7
|
"keywords": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"module": "./dist/index.esm.js",
|
|
21
21
|
"types": "./dist/index.cjs.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@module-federation/runtime": "0.0.0-next-
|
|
24
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
23
|
+
"@module-federation/runtime": "0.0.0-next-20240412091739",
|
|
24
|
+
"@module-federation/sdk": "0.0.0-next-20240412091739"
|
|
25
25
|
},
|
|
26
26
|
"exports": {
|
|
27
27
|
".": {
|