@tramvai/module-child-app 1.71.0 → 1.72.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.
@@ -288,6 +288,19 @@ const initModuleFederation = async (container, scope = 'default') => {
288
288
  },
289
289
  };
290
290
  }
291
+ if (process.env.NODE_ENV === 'development') {
292
+ // explicitly add react/jsx-runtime to support production builds of the child-app in dev mode
293
+ if (!shareScope['react/jsx-runtime']) {
294
+ shareScope['react/jsx-runtime'] = {
295
+ '*': {
296
+ get: () => () => require('react/jsx-runtime'),
297
+ from: 'tramvai-mf-fix',
298
+ eager: true,
299
+ loaded: true,
300
+ },
301
+ };
302
+ }
303
+ }
291
304
  };
292
305
  const getModuleFederation = async (container, name = 'entry') => {
293
306
  return container.get(name);
package/lib/server.es.js CHANGED
@@ -266,6 +266,19 @@ const initModuleFederation = async (container, scope = 'default') => {
266
266
  },
267
267
  };
268
268
  }
269
+ if (process.env.NODE_ENV === 'development') {
270
+ // explicitly add react/jsx-runtime to support production builds of the child-app in dev mode
271
+ if (!shareScope['react/jsx-runtime']) {
272
+ shareScope['react/jsx-runtime'] = {
273
+ '*': {
274
+ get: () => () => require('react/jsx-runtime'),
275
+ from: 'tramvai-mf-fix',
276
+ eager: true,
277
+ loaded: true,
278
+ },
279
+ };
280
+ }
281
+ }
269
282
  };
270
283
  const getModuleFederation = async (container, name = 'entry') => {
271
284
  return container.get(name);
@@ -606,7 +619,6 @@ class PreloadManager {
606
619
  return this.run('customer', config);
607
620
  }
608
621
  })
609
- .catch(noop)
610
622
  .then(() => config);
611
623
  this.map.set(key, promise);
612
624
  this.preloadMap.set(config.key, config);
package/lib/server.js CHANGED
@@ -276,6 +276,19 @@ const initModuleFederation = async (container, scope = 'default') => {
276
276
  },
277
277
  };
278
278
  }
279
+ if (process.env.NODE_ENV === 'development') {
280
+ // explicitly add react/jsx-runtime to support production builds of the child-app in dev mode
281
+ if (!shareScope['react/jsx-runtime']) {
282
+ shareScope['react/jsx-runtime'] = {
283
+ '*': {
284
+ get: () => () => require('react/jsx-runtime'),
285
+ from: 'tramvai-mf-fix',
286
+ eager: true,
287
+ loaded: true,
288
+ },
289
+ };
290
+ }
291
+ }
279
292
  };
280
293
  const getModuleFederation = async (container, name = 'entry') => {
281
294
  return container.get(name);
@@ -616,7 +629,6 @@ class PreloadManager {
616
629
  return this.run('customer', config);
617
630
  }
618
631
  })
619
- .catch(noop__default["default"])
620
632
  .then(() => config);
621
633
  this.map.set(key, promise);
622
634
  this.preloadMap.set(config.key, config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-child-app",
3
- "version": "1.71.0",
3
+ "version": "1.72.2",
4
4
  "description": "Module for child apps",
5
5
  "browser": {
6
6
  "./lib/server.js": "./lib/browser.js",
@@ -30,20 +30,20 @@
30
30
  "@tinkoff/env-validators": "0.0.3",
31
31
  "@tinkoff/module-loader-client": "0.3.25",
32
32
  "@tinkoff/module-loader-server": "0.4.41",
33
- "@tramvai/child-app-core": "1.71.0",
33
+ "@tramvai/child-app-core": "1.72.2",
34
34
  "@tramvai/safe-strings": "0.4.3",
35
- "@tramvai/tokens-child-app": "1.71.0"
35
+ "@tramvai/tokens-child-app": "1.72.2"
36
36
  },
37
37
  "devDependencies": {},
38
38
  "peerDependencies": {
39
39
  "@tinkoff/dippy": "0.7.38",
40
40
  "@tinkoff/utils": "^2.1.2",
41
- "@tramvai/core": "1.71.0",
42
- "@tramvai/state": "1.71.0",
43
- "@tramvai/react": "1.71.0",
44
- "@tramvai/tokens-common": "1.71.0",
45
- "@tramvai/tokens-render": "1.71.0",
46
- "@tramvai/tokens-router": "1.71.0",
41
+ "@tramvai/core": "1.72.2",
42
+ "@tramvai/state": "1.72.2",
43
+ "@tramvai/react": "1.72.2",
44
+ "@tramvai/tokens-common": "1.72.2",
45
+ "@tramvai/tokens-render": "1.72.2",
46
+ "@tramvai/tokens-router": "1.72.2",
47
47
  "react": ">=16.8.0",
48
48
  "react-dom": ">=16.8.0",
49
49
  "object-assign": "^4.1.1",