@module-federation/webpack-bundler-runtime 0.0.0-next-20240823062237 → 0.0.0-next-20240824225724

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,12 +171,9 @@ 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;
175
174
  // handling circular init calls
176
175
  var initToken = initTokens[shareScopeName];
177
- if (!initToken) initToken = initTokens[shareScopeName] = {
178
- from: mfInstance.name
179
- };
176
+ if (!initToken) initToken = initTokens[shareScopeName] = {};
180
177
  if (initScope.indexOf(initToken) >= 0) return;
181
178
  initScope.push(initToken);
182
179
  var promise = initPromises[shareScopeName];
@@ -204,11 +201,7 @@ function initializeSharing(param) {
204
201
  handleError(err);
205
202
  }
206
203
  };
207
- var promises = mfInstance.initializeSharing(shareScopeName, {
208
- strategy: mfInstance.options.shareStrategy,
209
- initScope: initScope,
210
- from: 'build'
211
- });
204
+ var promises = webpackRequire.federation.instance.initializeSharing(shareScopeName);
212
205
  attachShareScopeMap(webpackRequire);
213
206
  var bundlerRuntimeRemotesOptions = webpackRequire.federation.bundlerRuntimeOptions.remotes;
214
207
  if (bundlerRuntimeRemotesOptions) {
package/dist/index.esm.js CHANGED
@@ -149,12 +149,9 @@ 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;
153
152
  // handling circular init calls
154
153
  var initToken = initTokens[shareScopeName];
155
- if (!initToken) initToken = initTokens[shareScopeName] = {
156
- from: mfInstance.name
157
- };
154
+ if (!initToken) initToken = initTokens[shareScopeName] = {};
158
155
  if (initScope.indexOf(initToken) >= 0) return;
159
156
  initScope.push(initToken);
160
157
  var promise = initPromises[shareScopeName];
@@ -182,11 +179,7 @@ function initializeSharing(param) {
182
179
  handleError(err);
183
180
  }
184
181
  };
185
- var promises = mfInstance.initializeSharing(shareScopeName, {
186
- strategy: mfInstance.options.shareStrategy,
187
- initScope: initScope,
188
- from: 'build'
189
- });
182
+ var promises = webpackRequire.federation.instance.initializeSharing(shareScopeName);
190
183
  attachShareScopeMap(webpackRequire);
191
184
  var bundlerRuntimeRemotesOptions = webpackRequire.federation.bundlerRuntimeOptions.remotes;
192
185
  if (bundlerRuntimeRemotesOptions) {
package/dist/package.json CHANGED
@@ -36,6 +36,10 @@
36
36
  "import": "./dist/container.esm.js",
37
37
  "require": "./dist/container.cjs.js"
38
38
  },
39
+ "./vendor": {
40
+ "import": "./dist/vendored.esm.js",
41
+ "require": "./dist/vendored.cjs.js"
42
+ },
39
43
  "./*": "./*"
40
44
  },
41
45
  "typesVersions": {
@@ -49,6 +53,8 @@
49
53
  }
50
54
  },
51
55
  "devDependencies": {
52
- "@module-federation/runtime": "workspace:*"
56
+ "@module-federation/runtime": "workspace:*",
57
+ "@rollup/plugin-swc": "^0.3.1",
58
+ "rollup-plugin-cleanup": "^3.2.1"
53
59
  }
54
60
  }