@module-federation/webpack-bundler-runtime 0.0.0-next-20240504082822 → 0.0.0-next-20240510094642

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
@@ -235,9 +235,15 @@ function handleInitialConsumes(options) {
235
235
  throw new Error("Federation instance not found!");
236
236
  }
237
237
  var _moduleToHandlerMapping_moduleId = moduleToHandlerMapping[moduleId], shareKey = _moduleToHandlerMapping_moduleId.shareKey, shareInfo = _moduleToHandlerMapping_moduleId.shareInfo;
238
- return federationInstance.loadShareSync(shareKey, {
239
- customShareInfo: shareInfo
240
- });
238
+ try {
239
+ return federationInstance.loadShareSync(shareKey, {
240
+ customShareInfo: shareInfo
241
+ });
242
+ } catch (err) {
243
+ console.error('loadShareSync failed! The function should not be called unless you set "eager:true". If you do not set it, and encounter this issue, you can check whether an async boundary is implemented.');
244
+ console.error("The original error message is as follows: ");
245
+ throw err;
246
+ }
241
247
  }
242
248
  function installInitialConsumes(options) {
243
249
  var moduleToHandlerMapping = options.moduleToHandlerMapping, webpackRequire = options.webpackRequire, installedModules = options.installedModules, initialConsumes = options.initialConsumes;
package/dist/index.esm.js CHANGED
@@ -213,9 +213,15 @@ function handleInitialConsumes(options) {
213
213
  throw new Error("Federation instance not found!");
214
214
  }
215
215
  var _moduleToHandlerMapping_moduleId = moduleToHandlerMapping[moduleId], shareKey = _moduleToHandlerMapping_moduleId.shareKey, shareInfo = _moduleToHandlerMapping_moduleId.shareInfo;
216
- return federationInstance.loadShareSync(shareKey, {
217
- customShareInfo: shareInfo
218
- });
216
+ try {
217
+ return federationInstance.loadShareSync(shareKey, {
218
+ customShareInfo: shareInfo
219
+ });
220
+ } catch (err) {
221
+ console.error('loadShareSync failed! The function should not be called unless you set "eager:true". If you do not set it, and encounter this issue, you can check whether an async boundary is implemented.');
222
+ console.error("The original error message is as follows: ");
223
+ throw err;
224
+ }
219
225
  }
220
226
  function installInitialConsumes(options) {
221
227
  var moduleToHandlerMapping = options.moduleToHandlerMapping, webpackRequire = options.webpackRequire, installedModules = options.installedModules, initialConsumes = options.initialConsumes;
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.1.11",
4
+ "version": "0.1.13",
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.0.0-next-20240504082822",
4
+ "version": "0.0.0-next-20240510094642",
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-20240504082822",
24
- "@module-federation/sdk": "0.0.0-next-20240504082822"
23
+ "@module-federation/runtime": "0.0.0-next-20240510094642",
24
+ "@module-federation/sdk": "0.0.0-next-20240510094642"
25
25
  },
26
26
  "exports": {
27
27
  ".": {