@module-federation/webpack-bundler-runtime 0.5.0 → 0.5.2

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
@@ -171,9 +171,12 @@ function consumes(options) {
171
171
  function initializeSharing(param) {
172
172
  var shareScopeName = param.shareScopeName, webpackRequire = param.webpackRequire, initPromises = param.initPromises, initTokens = param.initTokens, initScope = param.initScope;
173
173
  if (!initScope) initScope = [];
174
+ var mfInstance = webpackRequire.federation.instance;
174
175
  // handling circular init calls
175
176
  var initToken = initTokens[shareScopeName];
176
- if (!initToken) initToken = initTokens[shareScopeName] = {};
177
+ if (!initToken) initToken = initTokens[shareScopeName] = {
178
+ from: mfInstance.name
179
+ };
177
180
  if (initScope.indexOf(initToken) >= 0) return;
178
181
  initScope.push(initToken);
179
182
  var promise = initPromises[shareScopeName];
@@ -201,7 +204,11 @@ function initializeSharing(param) {
201
204
  handleError(err);
202
205
  }
203
206
  };
204
- var promises = webpackRequire.federation.instance.initializeSharing(shareScopeName);
207
+ var promises = mfInstance.initializeSharing(shareScopeName, {
208
+ strategy: mfInstance.options.shareStrategy,
209
+ initScope: initScope,
210
+ from: 'build'
211
+ });
205
212
  attachShareScopeMap(webpackRequire);
206
213
  var bundlerRuntimeRemotesOptions = webpackRequire.federation.bundlerRuntimeOptions.remotes;
207
214
  if (bundlerRuntimeRemotesOptions) {
package/dist/index.esm.js CHANGED
@@ -149,9 +149,12 @@ function consumes(options) {
149
149
  function initializeSharing(param) {
150
150
  var shareScopeName = param.shareScopeName, webpackRequire = param.webpackRequire, initPromises = param.initPromises, initTokens = param.initTokens, initScope = param.initScope;
151
151
  if (!initScope) initScope = [];
152
+ var mfInstance = webpackRequire.federation.instance;
152
153
  // handling circular init calls
153
154
  var initToken = initTokens[shareScopeName];
154
- if (!initToken) initToken = initTokens[shareScopeName] = {};
155
+ if (!initToken) initToken = initTokens[shareScopeName] = {
156
+ from: mfInstance.name
157
+ };
155
158
  if (initScope.indexOf(initToken) >= 0) return;
156
159
  initScope.push(initToken);
157
160
  var promise = initPromises[shareScopeName];
@@ -179,7 +182,11 @@ function initializeSharing(param) {
179
182
  handleError(err);
180
183
  }
181
184
  };
182
- var promises = webpackRequire.federation.instance.initializeSharing(shareScopeName);
185
+ var promises = mfInstance.initializeSharing(shareScopeName, {
186
+ strategy: mfInstance.options.shareStrategy,
187
+ initScope: initScope,
188
+ from: 'build'
189
+ });
183
190
  attachShareScopeMap(webpackRequire);
184
191
  var bundlerRuntimeRemotesOptions = webpackRequire.federation.bundlerRuntimeOptions.remotes;
185
192
  if (bundlerRuntimeRemotesOptions) {
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "@module-federation/webpack-bundler-runtime",
4
- "version": "0.5.0",
4
+ "version": "0.5.2",
5
5
  "license": "MIT",
6
6
  "description": "Module Federation Runtime for webpack",
7
7
  "keywords": [
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.5.0",
4
+ "version": "0.5.2",
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.5.0",
24
- "@module-federation/sdk": "0.5.0"
23
+ "@module-federation/runtime": "0.5.2",
24
+ "@module-federation/sdk": "0.5.2"
25
25
  },
26
26
  "exports": {
27
27
  ".": {
@@ -49,6 +49,6 @@
49
49
  }
50
50
  },
51
51
  "devDependencies": {
52
- "@module-federation/runtime": "0.5.0"
52
+ "@module-federation/runtime": "0.5.2"
53
53
  }
54
54
  }